/[suikacvs]/test/cvs
Suika

Diff of /test/cvs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by wakaba, Tue May 14 13:50:11 2002 UTC revision 1.30 by wakaba, Thu Jul 4 06:38:21 2002 UTC
# Line 1  Line 1 
1    
2  =head1 NAME  =head1 NAME
3    
4  Message::Header Perl module  Message::Header --- A Perl Module for Internet Message Headers
   
 =head1 DESCRIPTION  
   
 Perl module for RFC 822/2822 message C<header>.  
5    
6  =cut  =cut
7    
8  package Message::Header;  package Message::Header;
9  use strict;  use strict;
10  use vars qw($VERSION %REG);  use vars qw(%DEFAULT @ISA %REG $VERSION);
11  $VERSION = '1.00';  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
12  use Carp ();  require Message::Field::Structured;     ## This may seem silly:-)
13  use overload '@{}' => sub { shift->_delete_empty_field->{field} },  push @ISA, qw(Message::Field::Structured);
14               '""' => sub { shift->stringify },  
15               fallback => 1;  %REG = %Message::Util::REG;
16            $REG{M_field} = qr/^([^\x3A]+):$REG{FWS}([\x00-\xFF]*)$/;
17  $REG{WSP}     = qr/[\x09\x20]/;          $REG{M_fromline} = qr/^\x3E?From$REG{WSP}+([\x00-\xFF]*)$/;
18  $REG{FWS}     = qr/[\x09\x20]*/;          $REG{ftext} = qr/[\x21-\x39\x3B-\x7E]+/;        ## [2]822
19  $REG{M_field} = qr/^([^\x3A]+):$REG{FWS}([\x00-\xFF]*)$/;          $REG{NON_ftext} = qr/[^\x21-\x39\x3B-\x7E]/;    ## [2]822
20  $REG{M_fromline} = qr/^\x3E?From$REG{WSP}+([\x00-\xFF]*)$/;          $REG{NON_ftext_usefor} = qr/[^0-9A-Za-z-]/;     ## name-character
21  $REG{UNSAFE_field_name} = qr/[\x00-\x20\x3A\x7F-\xFF]/;          $REG{NON_ftext_http} = $REG{NON_http_token};
22    
23  =head2 options  ## Namespace support
24            our %NS_phname2uri;     ## PH-namespace name -> namespace URI
25  These options can be getten/set by C<get_option>/C<set_option>          our %NS_uri2phpackage;  ## namespace URI -> PH-package name
26  method.          require Message::Header::Default;       ## Default namespace
27    
28  =head3 capitalize = 0/1  ## Initialize of this class -- called by constructors
29    %DEFAULT = (
30  (First character of) C<field-name> is capitalized      -_HASH_NAME => 'value',
31  when C<stringify>.  (Default = 1)      -_METHODS   => [qw|field field_exist field_type add replace count delete subject id is|],
32        -_MEMBERS   => [qw|value|],
33  =head3 fold_length = numeric value      -_VALTYPE_DEFAULT   => ':default',
34        -by => 'name',
35  Length of line used to fold.  (Default = 70)      -field_format_pattern       => '%s: %s',
36        -field_name_case_sensible   => 0,
37  =head3 mail_from = 0/1      -field_name_unsafe_rule     => 'NON_ftext',
38        -field_name_validation      => 0,
39  Outputs "From " line (known as Un*x From, Mail-From, and so on)      -field_sort => 0,
40  when C<stringify>.  (Default = 0)      -format     => 'mail-rfc2822',
41        -header_default_charset     => 'iso-2022-int-1',
42  =cut      -header_default_charset_input       => 'iso-2022-int-1',
43        -linebreak_strict   => 0,
44  =head1 CONSTRUCTORS      -line_length_max    => 60,  ## For folding
45        #ns_default_phuri
46  The following methods construct new C<Message::Header> objects:      -output_bcc => 0,
47        -output_folding     => 1,
48  =over 4      -output_mail_from   => 0,
49        #parse_all
50  =cut      -translate_underscore       => 1,
51        #uri_mailto_safe
52  ## Initialize      -uri_mailto_safe_level      => 4,
53  my %DEFAULT = (      -use_folding        => 1,
54    capitalize    => 1,      #value_type
   fold  => 1,  
   fold_length   => 70,  
   field_format_pattern  => '%s: %s',  
   #field_type   => {},  
   format        => 'mail-rfc2822',  
   linebreak_strict      => 0,  
   mail_from     => 0,  
   output_bcc    => 0,  
   parse_all     => 0,  
   sort  => 'none',  
   translate_underscore  => 1,  
   uri_mailto_safe       => {  
         ## 1 all (no check)     2 no trace & bcc & from  
         ## 3 no sender's info   4 (default) (currently not used)  
         ## 5 only a few  
         ':default'      => 4,  
         'cc'    => 4,  
         'bcc'   => 1,  
         'body'  => 1,  
         'comment'       => 5,  
         'content-id'    => 1,  
         'date'  => 1,  
         'from'  => 1,  
         'keywords'      => 5,  
         'list-id'       => 1,  
         'mail-from'     => 1,  
         'message-id'    => 1,  
         'received'      => 1,  
         'resent-bcc'    => 1,  
         'resent-date'   => 1,  
         'resent-from'   => 1,  
         'resent-sender' => 1,  
         'return-path'   => 1,  
         'sender'        => 1,  
         'subject'       => 5,  
         'summary'       => 5,  
         'to'    => 4,  
         'user-agent'    => 3,  
         'x-face'        => 2,  
         'x-mailer'      => 3,  
         'x-nsubject'    => 5,  
         'x-received'    => 1,  
         'x400-received' => 1,  
         },  
   uri_mailto_safe_level => 4,  
   validate      => 1,  
55  );  );
 $DEFAULT{field_type} = {  
         ':DEFAULT'      => 'Message::Field::Unstructured',  
           
         received        => 'Message::Field::Received',  
         'x-received'    => 'Message::Field::Received',  
           
         'content-type'  => 'Message::Field::ContentType',  
         p3p     => 'Message::Field::Params',  
         'auto-submitted'        => 'Message::Field::ValueParams',  
         'content-disposition'   => 'Message::Field::ValueParams',  
         link    => 'Message::Field::ValueParams',  
         archive => 'Message::Field::ValueParams',  
         'x-face-type'   => 'Message::Field::ValueParams',  
         'x-mozilla-draft-info'  => 'Message::Field::ValueParams',  
           
         subject => 'Message::Field::Subject',  
         'x-nsubject'    => 'Message::Field::Subject',  
           
         'list-software' => 'Message::Field::UA',  
         'user-agent'    => 'Message::Field::UA',  
         server  => 'Message::Field::UA',  
           
         ## A message id  
         'content-id'    => 'Message::Field::MsgID',  
         'message-id'    => 'Message::Field::MsgID',  
         'resent-message-id'     => 'Message::Field::MsgID',  
           
         ## Numeric value  
         'content-length'        => 'Message::Field::Numval',  
         lines   => 'Message::Field::Numval',  
         'max-forwards'  => 'Message::Field::Numval',  
         'mime-version'  => 'Message::Field::Numval',  
         'x-jsmail-priority'     => 'Message::Field::Numval',  
         'x-mail-count'  => 'Message::Field::Numval',  
         'x-ml-count'    => 'Message::Field::Numval',  
         'x-priority'    => 'Message::Field::Numval',  
           
         path    => 'Message::Field::Path',  
 };  
 for (qw(archive cancel-lock content-features content-md5  
   disposition-notification-options encoding  
   importance injector-info  
   pics-label posted-and-mailed precedence list-id message-type  
   original-recipient priority x-list-id  
   sensitivity status x-face x-msmail-priority xref))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::Structured'}  
         ## Not supported yet, but to be supported...  
         # x-list: unstructured, ml name  
 for (qw(abuse-reports-to apparently-to approved approved-by bcc cc complaints-to  
   delivered-to disposition-notification-to envelope-to  
   errors-to  from mail-copies-to mail-followup-to mail-reply-to  
   notice-requested-upon-delivery-to read-receipt-to register-mail-reply-requested-by  
   reply-to resent-bcc  
   resent-cc resent-to resent-from resent-sender return-path  
   return-receipt-to return-receipt-requested-to sender to x-abuse-reports-to  
   x-admin x-approved  
   x-beenthere  
   x-confirm-reading-to  
   x-complaints-to x-envelope-from x-envelope-sender  
   x-envelope-to x-ml-address x-ml-command x-ml-to x-nfrom x-nto  
   x-rcpt-to x-sender x-x-sender))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::Address'}  
 for (qw(client-date date date-received delivery-date expires  
   expire-date nntp-posting-date posted posted-date received-date  
   reply-by resent-date  
   x-originalarrivaltime x-tcup-date))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::Date'}  
 for (qw(article-updates in-reply-to  
   obsoletes references replaces see-also supersedes))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::MsgIDs'}  
 for (qw(accept accept-charset accept-encoding accept-language  
   content-language  
   content-transfer-encoding encrypted followup-to keywords  
   list-archive list-digest list-help list-owner  
   list-post list-subscribe list-unsubscribe list-url uri newsgroups  
   posted-to))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::CSV'}  
 for (qw(x-brother x-boss x-classmate x-daughter x-dearfriend x-favoritesong  
   x-friend x-me  
   x-moe x-respect  
   x-sublimate x-son x-sister x-wife))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::CSV'}  ## NOT M::F::XMOE!  
 for (qw(content-alias content-base content-location location referer  
   url x-home-page x-http_referer  
   x-info x-pgp-key x-ml-url x-uri x-url x-web))  
   {$DEFAULT{field_type}->{$_} = 'Message::Field::URI'}  
   
 my %header_goodcase = (  
         'article-i.d.'  => 'Article-I.D.',  
         'content-id'    => 'Content-ID',  
         'content-md5'   => 'Content-MD5',  
         'content-sgml-entity'   => 'Content-SGML-Entity',  
         etag    => 'ETag',  
         fax     => 'FAX',  
         'pics-label'    => 'PICS-Label',  
         'list-url'      => 'List-URL',  
         'list-id'       => 'List-ID',  
         'message-id'    => 'Message-ID',  
         'mime-version'  => 'MIME-Version',  
         'nic'   => 'NIC',  
         'nntp-posting-date'     => 'NNTP-Posting-Date',  
         'nntp-posting-host'     => 'NNTP-Posting-Host',  
         'resent-message-id'     => 'Resent-Message-ID',  
         te      => 'TE',  
         url     => 'URL',  
         'www-authenticate'      => 'WWW-Authenticate',  
         'x-dearfriend'  => 'X-DearFriend',  
         'x-mime-autoconverted'  => 'X-MIME-Autoconverted',  
         'x-nntp-posting-date'   => 'X-NNTP-Posting-Date',  
         'x-nntp-posting-host'   => 'X-NNTP-Posting-Host',  
         'x-uri' => 'X-URI',  
         'x-url' => 'X-URL',  
 );  
 $DEFAULT{capitalize} = sub {  
   my $self = shift;  
   my $name = shift;  
   if ($header_goodcase{$name}) {  
     return $header_goodcase{$name};  
   }  
   $name =~ s/(?:^|-)cgi-/uc $&/ge;  
   $name =~ s/(?:^|-)[a-z]/uc $&/ge;  
   $name;  
 };  
56    
57  ## taken from L<HTTP::Header>  ## taken from L<HTTP::Header>
58  # "Good Practice" order of HTTP message headers:  # "Good Practice" order of HTTP message headers:
# Line 257  my @header_order = qw( Line 84  my @header_order = qw(
84  );  );
85  my %header_order;  my %header_order;
86    
87    =head1 CONSTRUCTORS
88    
89    The following methods construct new C<Message::Header> objects:
90    
91    =over 4
92    
93    =cut
94    
95  sub _init ($;%) {  sub _init ($;%) {
96    my $self = shift;    my $self = shift;
97    my %options = @_;    my %options = @_;
98    $self->{field} = [];    my $DEFAULT = Message::Util::make_clone (\%DEFAULT);
99    $self->{option} = \%DEFAULT;    $self->SUPER::_init (%$DEFAULT, %options);
100      $self->{value} = [];
101      $self->_ns_load_ph ('default');
102      $self->_ns_load_ph ('rfc822');
103      $self->{option}->{ns_default_phuri} = $self->{ns}->{phname2uri}->{'rfc822'}
104        unless $self->{option}->{ns_default_phuri};
105      
106      ## For text/rfc822-headers
107      if (ref $options{entity_header}) {
108        $self->{entity_header} = $options{entity_header};
109        delete $options{entity_header};
110      }
111    my @new_fields = ();    my @new_fields = ();
112    for my $name (keys %options) {    for my $name (keys %options) {
113      if (substr ($name, 0, 1) eq '-') {      unless (substr ($name, 0, 1) eq '-') {
       $self->{option}->{substr ($name, 1)} = $options{$name};  
     } else {  
114        push @new_fields, ($name => $options{$name});        push @new_fields, ($name => $options{$name});
115      }      }
116    }    }
# Line 285  sub _init ($;%) { Line 129  sub _init ($;%) {
129  sub _init_by_format ($$\%) {  sub _init_by_format ($$\%) {
130    my $self = shift;    my $self = shift;
131    my ($format, $option) = @_;    my ($format, $option) = @_;
132    if ($format =~ /rfc822/) {    if ($format =~ /cgi/) {
     $header_goodcase{bcc} = 'bcc';  
     $header_goodcase{cc} = 'cc';  
     $header_goodcase{'resent-bcc'} = 'Resent-bcc';  
     $header_goodcase{'resent-cc'} = 'Resent-cc';  
   } elsif ($format =~ /cgi/) {  
133      unshift @header_order, qw(content-type location);      unshift @header_order, qw(content-type location);
134      $option->{sort} = 'good-practice';      $option->{field_sort} = 'good-practice';
135      $option->{fold} = 0;      $option->{use_folding} = 0;
136    } elsif ($format =~ /http/) {    } elsif ($format =~ /http/) {
137      $option->{sort} = 'good-practice';      $option->{field_sort} = 'good-practice';
138    }    }
139    if ($format =~ /uri-url-mailto/) {    if ($format =~ /uri-url-mailto/) {
140      $option->{output_bcc} = 0;      $option->{output_bcc} = 0;
     $option->{capitalize} = 0;  
141      $option->{field_format_pattern} = '%s=%s';      $option->{field_format_pattern} = '%s=%s';
142      $option->{fold} = sub {      $option->{output_folding} = sub {
143        $_[1] =~ s/([^:@+\$A-Za-z0-9\-_.!~*])/sprintf('%%%02X', ord $1)/ge;        $_[1] =~ s/([^:@+\$A-Za-z0-9\-_.!~*])/sprintf('%%%02X', ord $1)/ge;
144        $_[1];        $_[1];
145      };      };  ## Yes, this is not folding!
146    }    }
147  }  }
148    
149  =item Message::Header->new ([%initial-fields/options])  =item $msg = Message::Header->new ([%initial-fields/options])
150    
151  Constructs a new C<Message::Headers> object.  You might pass some initial  Constructs a new C<Message::Headers> object.  You might pass some initial
152  C<field-name>-C<field-body> pairs and/or options as parameters to the constructor.  C<field-name>-C<field-body> pairs and/or options as parameters to the constructor.
# Line 324  Example: Line 162  Example:
162    
163  =cut  =cut
164    
165  sub new ($;%) {  ## Inherited
   my $class = shift;  
   my $self = bless {}, $class;  
   $self->_init (@_);  
   $self;  
 }  
166    
167  =item Message::Header->parse ($header, [%initial-fields/options])  =item $msg = Message::Header->parse ($header, [%initial-fields/options])
168    
169  Parses given C<header> and constructs a new C<Message::Headers>  Parses given C<header> and constructs a new C<Message::Headers>
170  object.  You might pass some additional C<field-name>-C<field-body> pairs  object.  You might pass some additional C<field-name>-C<field-body> pairs
# Line 343  sub parse ($$;%) { Line 176  sub parse ($$;%) {
176    my $class = shift;    my $class = shift;
177    my $header = shift;    my $header = shift;
178    my $self = bless {}, $class;    my $self = bless {}, $class;
179    $self->_init (@_);    ## BUG: don't check linebreak_strict    $self->_init (@_);
180    $header =~ s/\x0D?\x0A$REG{WSP}/\x20/gos;     ## unfold    if ($self->{option}->{linebreak_strict}) {
181        $header =~ s/\x0D\x0A$REG{WSP}/\x20/gos if $self->{option}->{use_folding};
182      } else {
183        $header =~ s/\x0D?\x0A$REG{WSP}/\x20/gos if $self->{option}->{use_folding};
184      }
185    for my $field (split /\x0D?\x0A/, $header) {    for my $field (split /\x0D?\x0A/, $header) {
186      if ($field =~ /$REG{M_fromline}/) {      if ($field =~ /$REG{M_fromline}/) {
187        my $body = $1;        my ($s,undef,$value) = $self->_value_to_arrayitem
188        $body = $self->_field_body ($body, 'mail-from')          ('mail-from' => $1, $self->{option});
189          if $self->{option}->{parse_all};        push @{$self->{value}}, $value if $s;
       push @{$self->{field}}, {name => 'mail-from', body => $body};  
190      } elsif ($field =~ /$REG{M_field}/) {      } elsif ($field =~ /$REG{M_field}/) {
191        my ($name, $body) = (lc $1, $2);        my ($name, $body) = ($1, $2);
       $name =~ s/$REG{WSP}+$//;  
192        $body =~ s/$REG{WSP}+$//;        $body =~ s/$REG{WSP}+$//;
193        $body = $self->_field_body ($body, $name) if $self->{option}->{parse_all};        my ($s,undef,$value) = $self->_value_to_arrayitem
194        push @{$self->{field}}, {name => $name, body => $body};          ($name => $body, $self->{option});
195          push @{$self->{value}}, $value if $s;
196        } elsif (length $field) {
197          my ($s,undef,$value) = $self->_value_to_arrayitem
198            ('x-unknown' => $field, $self->{option});
199          push @{$self->{value}}, $value if $s;
200      }      }
201    }    }
202    $self;    $self;
203  }  }
204    
205  =item Message::Header->parse_array (\@header, [%initial-fields/options])  =item $msg = Message::Header->parse_array (\@header, [%initial-fields/options])
206    
207  Parses given C<header> and constructs a new C<Message::Headers>  Parses given C<header> and constructs a new C<Message::Headers>
208  object.  Same as C<Message::Header-E<lt>parse> but this method  object.  Same as C<Message::Header-E<lt>parse> but this method
# Line 381  sub parse_array ($\@;%) { Line 221  sub parse_array ($\@;%) {
221    $self->_init (@_);    $self->_init (@_);
222    while (1) {    while (1) {
223      my $field = shift @$header;      my $field = shift @$header;
224      while (1) {      if ($self->{option}->{use_folding}) {
225        if ($$header[0] =~ /^$REG{WSP}/) {        while (1) {
226          $field .= shift @$header;          if ($$header[0] =~ /^$REG{WSP}/) {
227        } else {last}            $field .= shift @$header;
228            } else {last}
229          }
230      }      }
231      if ($self->{option}->{linebreak_strict}) {      if ($self->{option}->{linebreak_strict}) {
232        $field =~ s/\x0D\x0A//g;        $field =~ s/\x0D\x0A//g;
233      } else {      } else {
234        $field =~ tr/\x0D\x0A//d;        $field =~ tr/\x0D\x0A//d;
235      }      }
236        local $self->{option}->{parse} = $self->{option}->{parse_all};
237      if ($field =~ /$REG{M_fromline}/) {      if ($field =~ /$REG{M_fromline}/) {
238        my $body = $1;        my ($s,undef,$value) = $self->_value_to_arrayitem
239        $body = $self->_field_body ($body, 'mail-from')          ('mail-from' => $1, $self->{option});
240          if $self->{option}->{parse_all};        push @{$self->{value}}, $value if $s;
       push @{$self->{field}}, {name => 'mail-from', body => $body};  
241      } elsif ($field =~ /$REG{M_field}/) {      } elsif ($field =~ /$REG{M_field}/) {
242        my ($name, $body) = (lc $1, $2);        my ($name, $body) = ($self->_n11n_field_name ($1), $2);
       $name =~ s/$REG{WSP}+$//;  
243        $body =~ s/$REG{WSP}+$//;        $body =~ s/$REG{WSP}+$//;
244        $body = $self->_field_body ($body, $name) if $self->{option}->{parse_all};        my ($s,undef,$value) = $self->_value_to_arrayitem
245        push @{$self->{field}}, {name => $name, body => $body};          ($name => $body, $self->{option});
246          push @{$self->{value}}, $value if $s;
247        } elsif (length $field) {
248          my ($s,undef,$value) = $self->_value_to_arrayitem
249            ('x-unknown' => $field, $self->{option});
250          push @{$self->{value}}, $value if $s;
251      }      }
252      last if $#$header < 0;      last if $#$header < 0;
253    }    }
# Line 421  context, only first one is returned.) Line 267  context, only first one is returned.)
267    
268  =cut  =cut
269    
270  sub field ($$) {  sub field ($@) {shift->SUPER::item (@_)}
271    sub field_exist ($@) {shift->SUPER::item_exist (@_)}
272    
273    ## item-by?, \$checked-item, {item-key => 1}, \%option
274    sub _item_match ($$\$\%\%) {
275    my $self = shift;    my $self = shift;
276    my $name = lc shift;    my ($by, $i, $list, $option) = @_;
277    my @ret;    return 0 unless ref $$i;  ## Already removed
278    for my $field (@{$self->{field}}) {    if ($by eq 'name') {
279      if ($field->{name} eq $name) {      my %o = %$option; $o{parse} = 0;
280        unless (wantarray) {      my %l;
281          $field->{body} = $self->_field_body ($field->{body}, $name);      for (keys %$list) {
282          return $field->{body};        my ($s, undef, $v) = $self->_value_to_arrayitem ($_, '', %o);
283          if ($s) {
284            $l{$v->{name} . ':' . ( $option->{ns} || $v->{ns} ) } = 1;
285        } else {        } else {
286          $field->{body} = $self->_field_body ($field->{body}, $name);          $l{$v->{name} .':'. ( $option->{ns} || $self->{option}->{ns_default_phuri} ) } = 1;
         push @ret, $field->{body};  
287        }        }
288      }      }
289    }      return 1 if $l{$$i->{name} . ':' . $$i->{ns}};
290    if ($#ret < 0) {    } elsif ($by eq 'ns') {
291      return $self->add ($name);      return 1 if $list->{ $$i->{ns} };
   }  
   @ret;  
 }  
   
 sub field_exist ($$) {  
   my $self = shift;  
   my $name = lc shift;  
   my @ret;  
   for my $field (@{$self->{field}}) {  
     return 1 if ($field->{name} eq $name);  
292    }    }
293    0;    0;
294  }  }
295    *_delete_match = \&_item_match;
296    
297  =head2 $self->field_name ($index)  ## Returns returned item value    \$item-value, \%option
298    sub _item_return_value ($\$\%) {
299  Returns C<field-name> of $index'th C<field>.    if (ref ${$_[1]}->{body}) {
300        ${$_[1]}->{body};
301  =head2 $self->field_body ($index)    } else {
302        ${$_[1]}->{body} = $_[0]->_parse_value (${$_[1]}->{name} => ${$_[1]}->{body},
303          ns => ${$_[1]}->{ns});
304        ${$_[1]}->{body};
305      }
306    }
307    *_add_return_value = \&_item_return_value;
308    *_replace_return_value = \&_item_return_value;
309    
310    ## Returns returned (new created) item value    $name, \%option
311    sub _item_new_value ($$\%) {
312        my ($s,undef,$value) = $_[0]->_value_to_arrayitem
313            ($_[1] => '', $_[2]);
314        $s? $value: undef;
315    }
316    
 Returns C<field-body> of $index'th C<field>.  
317    
 =cut  
318    
319  sub field_name ($$) {  ## $self->_parse_value ($type, $value, %options);
320    my $self = shift;  sub _parse_value ($$$;%) {
321    $self->{field}->[shift]->{name};    my $self = shift;
322  }    my $name = shift ;#|| $self->{option}->{_VALTYPE_DEFAULT};
323  sub field_body ($$) {    my $value = shift;  return $value if ref $value;
324    my $self = shift;    my %option = @_;
325    my $i = shift;    my $vtype; { no strict 'refs';
326    $self->{field}->[$i]->{body}      my $vt = ${&_NS_uri2phpackage ($option{ns}).'::OPTION'}{value_type};
327     = $self->_field_body ($self->{field}->[$i]->{body}, $self->{field}->[$i]->{name});      if (ref $vt) {
328    $self->{field}->[$i]->{body};        $vtype = $vt->{$name} || $vt->{$self->{option}->{_VALTYPE_DEFAULT}};
329        }
330        ## For compatiblity.
331        unless (ref $vtype) { $vtype = $self->{option}->{value_type}->{$name}
332          || $self->{option}->{value_type}->{$self->{option}->{_VALTYPE_DEFAULT}} }
333      }
334      my $vpackage = $vtype->[0];
335      my %vopt = %{$vtype->[1]} if ref $vtype->[1];
336      if ($vpackage eq ':none:') {
337        return $value;
338      } elsif (defined $value) {
339        eval "require $vpackage" or Carp::croak qq{<parse>: $vpackage: Can't load package: $@};
340        return $vpackage->parse ($value,
341          -format   => $self->{option}->{format},
342          -field_ns => $option{ns},
343          -field_name       => $name,
344        -header_default_charset     => $self->{option}->{header_default_charset},
345        -header_default_charset_input       => $self->{option}->{header_default_charset_input},
346          -parse_all        => $self->{option}->{parse_all},
347        %vopt);
348      } else {
349        eval "require $vpackage" or Carp::croak qq{<parse>: $vpackage: Can't load package: $@};
350        return $vpackage->new (
351          -format   => $self->{option}->{format},
352          -field_ns => $option{ns},
353          -field_name       => $name,
354        -header_default_charset     => $self->{option}->{header_default_charset},
355        -header_default_charset_input       => $self->{option}->{header_default_charset_input},
356          -parse_all        => $self->{option}->{parse_all},
357        %vopt);
358      }
359  }  }
360    
361  sub _field_body ($$$) {  ## Defined for text/rfc822-headers
362    my $self = shift;  sub entity_header ($;$) {
363    my ($body, $name) = @_;    my $self = shift;
364    unless (ref $body) {    my $new_header = shift;
365      my $type = $self->{option}->{field_type}->{$name}    if (ref $new_header) {
366              || $self->{option}->{field_type}->{':DEFAULT'};      $self->{header} = $new_header;
     eval "require $type" or Carp::croak ("_field_body: $type: $@");  
     unless ($body) {  
       $body = $type->new (-field_name => $name,  
         -format => $self->{option}->{format},  
         -parse_all => $self->{option}->{parse_all},  
         field_name => $name, format => $self->{option}->{format});  
     } else {  
       $body = $type->parse ($body, -field_name => $name,  
         -format => $self->{option}->{format},  
         -parse_all => $self->{option}->{parse_all},  
          field_name => $name,format => $self->{option}->{format});  
     }  
367    }    }
368    $body;    $self->{header};
369  }  }
370    
371  =head2 $self->field_name_list ()  =head2 $self->field_name_list ()
# Line 506  returns ALL names.) Line 378  returns ALL names.)
378    
379  sub field_name_list ($) {  sub field_name_list ($) {
380    my $self = shift;    my $self = shift;
381    $self->_delete_empty_field ();    $self->_delete_empty ();
382    map {$_->{name}} @{$self->{field}};    map { $_->{name} . ':' . $_->{ns} } @{$self->{value}};
383    }
384    
385    sub namespace_ph_default ($;$) {
386      my $self = shift;
387      if (defined $_[0]) {
388        no strict 'refs';
389        $self->{option}->{ns_default_phuri} = $_[0];
390        $self->_ns_load_ph (${&_NS_uri2phpackage ($self->{option}->{ns_default_phuri}).'::OPTION'}{namespace_phname});
391      }
392      $self->{option}->{ns_default_phuri};
393  }  }
394    
395  =item $hdr->add ($field-name, $field-body, [$name, $body, ...])  =item $hdr->add ($field-name, $field-body, [$name, $body, ...])
# Line 533  C<-validate>: Checks whether C<field-nam Line 415  C<-validate>: Checks whether C<field-nam
415    
416  =cut  =cut
417    
418  sub add ($%) {  ## [Name: Value] pair -> internal array item
419    my $self = shift;  ## $self->_value_to_arrayitem ($name => $value, {%options})
420    my %fields = @_;  ## or
421    my %option = %{$self->{option}};  ## $self->_value_to_arrayitem ($name => [$value, %value_options], {%options})
422    $option{parse} = 1 if defined wantarray;  ##
423    for (grep {/^-/} keys %fields) {$option{substr ($_, 1)} = $fields{$_}}  ## Return: ((1 = success / 0 = failue), $full_name, $arrayitem)
424    my $body;  sub _value_to_arrayitem ($$$\%) {
425    for (grep {/^[^-]/} keys %fields) {    my $self = shift;
426      my $name = lc $_;  $body = $fields{$_};    my ($name, $value, $option) = @_;
427      $name =~ tr/_/-/ if $option{translate_underscore};    my $value_option = {};
428      Carp::croak "add: $name: invalid field-name"    if (ref $value eq 'ARRAY') {
429        if $option{validate} && $name =~ /$REG{UNSAFE_field_name}/;      ($value, %$value_option) = @$value;
     $body = $self->_field_body ($body, $name) if $option{parse};  
     if ($option{prepend}) {  
       unshift @{$self->{field}}, {name => $name, body => $body};  
     } else {  
       push @{$self->{field}}, {name => $name, body => $body};  
     }  
430    }    }
431    $body if $option{parse};    my $nsuri = $self->{option}->{ns_default_phuri};
432      
433      no strict 'refs';
434      if ($value_option->{ns}) {
435        $nsuri = $value_option->{ns};
436      } elsif ($option->{ns}) {
437        $nsuri = $option->{ns};
438      } elsif ($name =~ s/^([Xx]-[A-Za-z]+|[A-Za-z]+)-//) {
439        my $oprefix = $1;
440        my $prefix
441          = &{${&_NS_uri2phpackage ($nsuri).'::OPTION'}{n11n_prefix}}
442            ($self, &_NS_uri2phpackage ($nsuri), $oprefix);
443        $self->_ns_load_ph ($prefix);
444        $nsuri = $self->{ns}->{phname2uri}->{$prefix};
445        unless ($nsuri) {
446          $name = $oprefix . '-' . $name;
447          $nsuri = $self->{option}->{ns_default_phuri};
448        }
449      }
450      $name
451        = &{${&_NS_uri2phpackage ($nsuri).'::OPTION'}{n11n_name}}
452          ($self, &_NS_uri2phpackage ($nsuri), $name);
453      Carp::croak "$name: invalid field-name"
454        if $option->{field_name_validation}
455          && $name =~ /$REG{$option->{field_name_unsafe_rule}}/;
456      $value = $self->_parse_value ($name => $value, ns => $nsuri)
457        if $$option{parse} || $$option{parse_all};
458      $$option{parse} = 0;
459      (1, $name.':'.$nsuri => {name => $name, body => $value, ns => $nsuri});
460  }  }
461    *_add_hash_check = \&_value_to_arrayitem;
462    *_replace_hash_check = \&_value_to_arrayitem;
463    
464  =head2 $self->relace ($field_name, $field_body)  =head2 $self->relace ($field_name, $field_body)
465    
# Line 565  first one is used and the others are not Line 471  first one is used and the others are not
471    
472  =cut  =cut
473    
474  sub replace ($%) {  sub _replace_hash_shift ($\%$\%) {
475    my $self = shift;    shift; my $r = shift;  my $n = $_[0]->{name} . ':' . $_[0]->{ns};
476    my %params = @_;    if ($$r{$n}) {
477    my %option = %{$self->{option}};      my $d = $$r{$n};
478    $option{parse} = defined wantarray unless defined $option{parse};      delete $$r{$n};
479    for (grep {/^-/} keys %params) {$option{substr ($_, 1)} = $params{$_}}      return $d;
   my (%new_field);  
   for (grep {/^[^-]/} keys %params) {  
     my $name = lc $_;  
     $name =~ tr/_/-/ if $option{translate_underscore};  
     Carp::croak "replace: $name: invalid field-name"  
       if $option{validate} && $name =~ /$REG{UNSAFE_field_name}/;  
     $params{$_} = $self->_field_body ($params{$_}, $name) if $option{parse};  
     $new_field{$name} = $params{$_};  
   }  
   my $body = (%new_field)[-1];  
   for my $field (@{$self->{field}}) {  
     if (defined $new_field{$field->{name}}) {  
       $field->{body} = $new_field {$field->{name}};  
       $new_field{$field->{name}} = undef;  
     }  
480    }    }
481    for (keys %new_field) {    undef;
     push @{$self->{field}}, {name => $_, body => $new_field{$_}};  
   }  
   $body if $option{parse};  
482  }  }
483    
484  =head2 $self->delete ($field-name, [$name, ...])  =head2 $self->delete ($field-name, [$name, ...])
# Line 599  Deletes C<field> named as $field_name. Line 487  Deletes C<field> named as $field_name.
487    
488  =cut  =cut
489    
 sub delete ($@) {  
   my $self = shift;  
   my %delete;  for (@_) {$delete{lc $_} = 1}  
   for my $field (@{$self->{field}}) {  
     undef $field if $delete{$field->{name}};  
   }  
 }  
490    
491  =head2 $self->count ([$field_name])  =head2 $self->count ([$field_name])
492    
# Line 615  of fields.  (Same as $#$self+1) Line 496  of fields.  (Same as $#$self+1)
496    
497  =cut  =cut
498    
499  sub count ($;$) {  sub _count_by_name ($$\%) {
500    my $self = shift;    my $self = shift;
501    my ($name) = (lc shift);    my ($array, $option) = @_;
502    unless ($name) {    my $name = $self->_n11n_field_name ($$option{-name});
503      $self->_delete_empty_field ();    my @a = grep {$_->{name} eq $name} @{$self->{$array}};
504      return $#{$self->{field}}+1;    $#a + 1;
505    }  }
506    my $count = 0;  
507    for my $field (@{$self->{field}}) {  ## Delete empty items
508      if ($field->{name} eq $name) {  sub _delete_empty ($) {
509        $count++;    my $self = shift;
510      }    my $array = $self->{option}->{_HASH_NAME};
511    }    $self->{$array} = [grep {ref $_ && length $_->{name}} @{$self->{$array}}];
   $count;  
512  }  }
513    
514  =head2 $self->rename ($field-name, $new-name, [$old, $new,...])  =head2 $self->rename ($field-name, $new-name, [$old, $new,...])
# Line 644  sub rename ($%) { Line 524  sub rename ($%) {
524    for (grep {/^-/} keys %params) {$option{substr ($_, 1)} = $params{$_}}    for (grep {/^-/} keys %params) {$option{substr ($_, 1)} = $params{$_}}
525    my %new_name;    my %new_name;
526    for (grep {/^[^-]/} keys %params) {    for (grep {/^[^-]/} keys %params) {
527      my ($old => $new) = (lc $_ => lc $params{$_});      my ($old => $new)
528          = ($self->_n11n_field_name ($_) => $self->_n11n_field_name ($params{$_}));
529        $old =~ tr/_/-/ if $option{translate_underscore};
530      $new =~ tr/_/-/ if $option{translate_underscore};      $new =~ tr/_/-/ if $option{translate_underscore};
531      Carp::croak "rename: $new: invalid field-name"      Carp::croak "rename: $new: invalid field-name"
532        if $option{validate} && $new =~ /$REG{UNSAFE_field_name}/;        if $option{field_name_validation}
533            && $new =~ /$REG{$option{field_name_unsafe_rule}}/;
534      $new_name{$old} = $new;      $new_name{$old} = $new;
535    }    }
536    for my $field (@{$self->{field}}) {    for my $field (@{$self->{value}}) {
537      if (length $new_name{$field->{name}}) {      if (length $new_name{$field->{name}}) {
538        $field->{name} = $new_name{$field->{name}};        $field->{name} = $new_name{$field->{name}};
539      }      }
# Line 668  for each value. Line 551  for each value.
551    
552  =cut  =cut
553    
554  sub scan ($&) {  sub _scan_sort ($\@\%) {
555    my ($self, $sub) = @_;    my $self = shift;
556      my ($array, $option) = @_;
557    my $sort;    my $sort;
558    $sort = \&_header_cmp if $self->{option}->{sort} eq 'good-practice';    $sort = \&_header_cmp if $option->{field_sort} eq 'good-practice';
559    $sort = {$a cmp $b} if $self->{option}->{sort} eq 'alphabetic';    $sort = {$a cmp $b} if $option->{field_sort} eq 'alphabetic';
560    my @field = @{$self->{field}};    return ( sort $sort @$array ) if ref $sort;
561    if (ref $sort) {    @$array;
562      @field = sort $sort @{$self->{field}};  }
563    }  
564    for my $field (@field) {  sub _n11n_field_name ($$) {
565      next if $field->{name} =~ /^_/;    no strict 'refs';
566      &$sub($field->{name} => $field->{body});    my $self = shift;
567    }    my $s = shift;
568      $s =~ s/^$REG{WSP}+//; $s =~ s/$REG{WSP}+$//;
569      $s = lc $s unless ${&_NS_uri2phpackage ($self->{option}->{ns_default_phuri}).'::OPTION'}{case_sensible};
570      $s;
571  }  }
572    
573  # Compare function which makes it easy to sort headers in the  # Compare function which makes it easy to sort headers in the
# Line 713  sub stringify ($;%) { Line 600  sub stringify ($;%) {
600    for (grep {/^-/} keys %params) {$option{substr ($_, 1)} = $params{$_}}    for (grep {/^-/} keys %params) {$option{substr ($_, 1)} = $params{$_}}
601    my @ret;    my @ret;
602    my $_stringify = sub {    my $_stringify = sub {
603        my ($name, $body) = (@_);      no strict 'refs';
604          my ($name, $body, $nsuri) = ($_[1]->{name}, $_[1]->{body}, $_[1]->{ns});
605        return unless length $name;        return unless length $name;
606        return if $option{mail_from} && $name eq 'mail-from';        return if $option{output_mail_from} && $name eq 'mail-from';
607        return if !$option{output_bcc} && ($name eq 'bcc' || $name eq 'resent-bcc');        $body = '' if !$option{output_bcc} && $name eq 'bcc';
608          my $nspackage = &_NS_uri2phpackage ($nsuri);
609          my $oname;        ## Outputed field-name
610          my $prefix = ${$nspackage.'::OPTION'} {namespace_phname_goodcase}
611                    || $self->{ns}->{uri2phname}->{$nsuri};
612          $prefix = undef if $nsuri eq $self->{option}->{ns_default_phuri};
613          my $gc = ${$nspackage.'::OPTION'} {to_be_goodcase};
614          if (ref $gc) { $oname = &$gc ($self, $nspackage, $name, \%option) }
615          else { $oname = $name }
616          if ($prefix) { $oname = $prefix . '-' . $oname }
617        if ($option{format} =~ /uri-url-mailto/) {        if ($option{format} =~ /uri-url-mailto/) {
618          return if ((   $option{uri_mailto_safe}->{$name}          return if (( ${$nspackage.'::OPTION'} {uri_mailto_safe}->{$name}
619               || $option{uri_mailto_safe}->{':default'})                    || ${$nspackage.'::OPTION'} {uri_mailto_safe}->{':default'})
620                < $option{uri_mailto_safe_level});                    < $option{uri_mailto_safe_level});
621          if ($name eq 'to') {          if ($name eq 'to') {
622            $body = $self->field ('to');            $body = $self->field ('to', -new_item_unless_exist => 0);
623            return unless ref $body && $body->have_group;            if (ref $body && $body->have_group) {
624                #
625              } elsif (ref $body && $body->count > 1) {
626                $body = $body->clone;
627                $body->delete ({-by => 'index'}, 0);
628              }
629          }          }
630        }        }
631        my $fbody;        my $fbody;
# Line 732  sub stringify ($;%) { Line 634  sub stringify ($;%) {
634        } else {        } else {
635          $fbody = $body;          $fbody = $body;
636        }        }
637        return unless length $fbody;        unless (${$nspackage.'::OPTION'} {field}->{$name}->{empty_body}) {
638            return unless length $fbody;
639          }
640        unless ($option{linebreak_strict}) {        unless ($option{linebreak_strict}) {
641          ## bare \x0D and bare \x0A are unsafe          ## bare \x0D and bare \x0A are unsafe
642          $fbody =~ s/\x0D(?=[^\x09\x0A\x20])/\x0D\x20/g;          $fbody =~ s/\x0D(?=[^\x09\x0A\x20])/\x0D\x20/g;
# Line 740  sub stringify ($;%) { Line 644  sub stringify ($;%) {
644        } else {        } else {
645          $fbody =~ s/\x0D\x0A(?=[^\x09\x20])/\x0D\x0A\x20/g;          $fbody =~ s/\x0D\x0A(?=[^\x09\x20])/\x0D\x0A\x20/g;
646        }        }
647        if (ref $option{capitalize}) {        if ($option{use_folding}) {
648          $name = &{$option{capitalize}} ($self, $name);          if (ref $option{output_folding}) {
649        } elsif ($option{capitalize}) {            $fbody = &{$option{output_folding}} ($self, $fbody,
650          $name =~ s/((?:^|-)[a-z])/uc($1)/ge;              -initial_length => length ($oname) +2);
651        }          } elsif ($option{output_folding}) {
652        if (ref $option{fold}) {            $fbody = $self->_fold ($fbody, -initial_length => length ($oname) +2);
653          $fbody = &{$option{fold}} ($self, $fbody);          }
       } elsif ($option{fold}) {  
         $fbody = $self->_fold ($fbody);  
654        }        }
655        push @ret, sprintf $option{field_format_pattern}, $name, $fbody;        push @ret, sprintf $option{field_format_pattern}, $oname, $fbody;
656      };      };
657    if ($option{format} =~ /uri-url-mailto-to/) {    if ($option{format} =~ /uri-url-mailto/) {
658      if ($self->field_exist ('to')) {      if ($option{format} =~ /uri-url-mailto-to/) {
659        my $to = $self->field ('to');        my $to = $self->field ('to', -new_item_unless_exist => 0);
660        unless ($to->have_group) {        if ($to) {
661          my $fbody = $to->stringify (-format => $option{format});          unless ($to->have_group) {
662          return &{$option{fold}} ($self, $fbody);            my $fbody = $to->stringify (-format => $option{format}, -max => 1);
663              return &{$option{output_folding}} ($self, $fbody);
664            }
665          }
666          '';
667        } elsif ($option{format} =~ /uri-url-mailto-rfc1738/) {
668          my $to = $self->field ('to', -new_item_unless_exist => 0);
669          if ($to) {
670            my $fbody = $to->addr_spec (-format => $option{format});
671            return &{$option{output_folding}} ($self, $fbody);
672        }        }
673          '';
674        } else {
675          $self->scan ($_stringify);
676          my $ret = join ('&', @ret);
677          $ret;
678      }      }
     '';  
   } elsif ($option{format} =~ /uri-url-mailto/) {  
     $self->scan ($_stringify);  
     my $ret = join ('&', @ret);  
     $ret;  
679    } else {    } else {
680      if ($option{mail_from}) {      if ($option{output_mail_from}) {
681        my $fromline = $self->field ('mail-from');        my $fromline = $self->field ('mail-from', -new_item_unless_exist => 0);
682        push @ret, 'From '.$fromline if $fromline;        push @ret, 'From '.$fromline if $fromline;
683      }      }
684      $self->scan ($_stringify);      $self->scan ($_stringify);
685      my $ret = join ("\n", @ret);      my $ret = join ("\x0D\x0A", @ret);
686      $ret? $ret."\n": '';      $ret? $ret."\x0D\x0A": '';
687    }    }
688  }  }
689  *as_string = \&stringify;  *as_string = \&stringify;
# Line 789  sub option ($@) { Line 700  sub option ($@) {
700      return $self->{option}->{ shift (@_) };      return $self->{option}->{ shift (@_) };
701    }    }
702    while (my ($name, $value) = splice (@_, 0, 2)) {    while (my ($name, $value) = splice (@_, 0, 2)) {
     $name =~ s/^-//;  
703      $self->{option}->{$name} = $value;      $self->{option}->{$name} = $value;
704      if ($name eq 'format') {      if ($name eq 'format') {
705        for my $f (@{$self->{field}}) {        for my $f (@{$self->{field}}) {
# Line 801  sub option ($@) { Line 711  sub option ($@) {
711    }    }
712  }  }
713    
714  sub field_type ($$;$) {  sub field_type ($@) {shift->SUPER::value_type (@_)}
715    
716    ## $self->_fold ($string, %option = (-max, -initial_length(for field-name)) )
717    sub _fold ($$;%) {
718    my $self = shift;    my $self = shift;
719    my $field_name = shift;    my $string = shift;
720    my $new_field_type = shift;    my %option = @_;
721    if ($new_field_type) {    my $max = $self->{option}->{line_length_max};
722      $self->{option}->{field_type}->{$field_name} = $new_field_type;    $max = 20 if $max < 20;
723    }    
724    $self->{option}->{field_type}->{$field_name}    my $l = $option{-initial_length} || 0;
725    || $self->{option}->{field_type}->{':DEFAULT'};    $l += length $1 if $string =~ /^([^\x09\x20]+)/;
726      $string =~ s{([\x09\x20][^\x09\x20]+)}{
727        my $s = $1;
728        if (($l + length $s) > $max) {
729          $s = "\x0D\x0A\x20" . $s;
730          $l = 1 + length $s;
731        } else { $l += length $s }
732        $s;
733      }gex;
734      $string;
735  }  }
736    
737  sub _delete_empty_field ($) {  sub _ns_load_ph ($$) {
738    my $self = shift;    my $self = shift;
739    my @ret;    my $name = shift;     ## normalized prefix (without HYPHEN-MINUS)
740    for my $field (@{$self->{field}}) {    return if $self->{ns}->{phname2uri}->{$name};
741      push @ret, $field if $field->{name};    $self->{ns}->{phname2uri}->{$name} = $NS_phname2uri{$name};
742    }    return unless $self->{ns}->{phname2uri}->{$name};
743    $self->{field} = \@ret;    $self->{ns}->{uri2phname}->{$self->{ns}->{phname2uri}->{$name}} = $name;
   $self;  
744  }  }
745    
746  sub _fold ($$;$) {  sub _NS_uri2phpackage ($) {
747    my $self = shift;    $NS_uri2phpackage{$_[0]}
748    my $string = shift;    || $NS_uri2phpackage{$Message::Header::Default::OPTION{namespace_uri}};
   my $len = shift || $self->{option}->{fold_length};  
   $len = 60 if $len < 60;  
     
   ## This code is taken from Mail::Header 1.43 in MailTools,  
   ## by Graham Barr (Maintained by Mark Overmeer <mailtools@overmeer.net>).  
   my $max = int($len - 5);         # 4 for leading spcs + 1 for [\,\;]  
   my $min = int($len * 4 / 5) - 4;  
   my $ml = $len;  
     
   if (length($string) > $ml) {  
      #Split the line up  
      # first bias towards splitting at a , or a ; >4/5 along the line  
      # next split a whitespace  
      # else we are looking at a single word and probably don't want to split  
      my $x = "";  
      $x .= "$1\n "  
        while($string =~ s/^$REG{WSP}*(  
                           [^"]{$min,$max}?[\,\;]  
                           |[^"]{1,$max}$REG{WSP}  
                           |[^\s"]*(?:"[^"]*"[^\s"]*)+$REG{WSP}  
                           |[^\s"]+$REG{WSP}  
                           )  
                         //x);  
      $x .= $string;  
      $string = $x;  
      $string =~ s/(\A$REG{WSP}+|$REG{WSP}+\Z)//sog;  
      $string =~ s/\s+\n/\n/sog;  
   }  
   $string;  
749  }  }
750    
751  =head2 $self->clone ()  =head2 $self->clone ()
# Line 862  Returns a copy of Message::Header object Line 754  Returns a copy of Message::Header object
754    
755  =cut  =cut
756    
757  sub clone ($) {  ## Inhreited
   my $self = shift;  
   my $clone = new Message::Header;  
   for my $name (%{$self->{option}}) {  
     if (ref $self->{option}->{$name} eq 'HASH') {  
       $clone->{option}->{$name} = {%{$self->{option}->{$name}}};  
     } elsif (ref $self->{option}->{$name} eq 'ARRAY') {  
       $clone->{option}->{$name} = [@{$self->{option}->{$name}}];  
     } else {  
       $clone->{option}->{$name} = $self->{option}->{$name};  
     }  
   }  
   for (@{$self->{field}}) {  
     $clone->add ($_->{name}, scalar $_->{body});  
   }  
   $clone;  
 }  
758    
759  =head1 NOTE  =head1 NOTE
760    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.30

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24