34 |
':default' => ['Message::Field::Unstructured'], |
':default' => ['Message::Field::Unstructured'], |
35 |
}; |
}; |
36 |
|
|
37 |
|
## mailto: URL safe level |
38 |
|
$OPTION{uri_mailto_safe} = { |
39 |
|
## 1 all (no check) 2 no trace & bcc & from |
40 |
|
## 3 no sender's info 4 (default) (currently not used) |
41 |
|
## 5 only a few |
42 |
|
':default' => 1, |
43 |
|
}; |
44 |
|
|
45 |
## |
## |
46 |
|
|
47 |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
48 |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
49 |
|
|
50 |
## $self->_goodcase ($namespace_package_name, $field_name) |
## $self->_goodcase ($namespace_package_name, $field_name, \%option) |
51 |
sub _goodcase ($$$) { |
sub _goodcase ($$$\%) { |
52 |
no strict 'refs'; |
no strict 'refs'; |
53 |
my $self = shift; |
my $self = shift; |
54 |
my $nspack = shift; |
my ($nspack, $name, $option) = @_; |
|
my $name = shift; |
|
55 |
if (${$nspack.'::OPTION'}{goodcase}->{$name}) { |
if (${$nspack.'::OPTION'}{goodcase}->{$name}) { |
56 |
return ${$nspack.'::OPTION'}{goodcase}->{$name}; |
return ${$nspack.'::OPTION'}{goodcase}->{$name}; |
57 |
} |
} |
71 |
} |
} |
72 |
} |
} |
73 |
|
|
|
package Message::Header::RFC822; |
|
|
our %OPTION = %Message::Header::Default::OPTION; |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:mail-rfc822'; |
|
|
$OPTION{namespace_phname} = 'rfc822'; |
|
|
$OPTION{namespace_phname_goodcase} = 'RFC822'; |
|
|
|
|
|
$OPTION{case_sensible} = 0; |
|
|
|
|
|
$OPTION{goodcase} = { |
|
|
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', |
|
|
url => 'URL', |
|
|
'x-dearfriend' => 'X-DearFriend', |
|
|
'x-jsmail-priority' => 'X-JsMail-Priority', |
|
|
'x-mime-autoconverted' => 'X-MIME-Autoconverted', |
|
|
'x-mimeole' => 'X-MimeOLE', |
|
|
'x-msmail-priority' => 'X-MSMail-Priority', |
|
|
'x-nntp-posting-date' => 'X-NNTP-Posting-Date', |
|
|
'x-nntp-posting-host' => 'X-NNTP-Posting-Host', |
|
|
'x-uidl' => 'X-UIDL', |
|
|
'x-uri' => 'X-URI', |
|
|
'x-url' => 'X-URL', |
|
|
}; |
|
|
$OPTION{to_be_goodcase} = \&Message::Header::Default::_goodcase; |
|
|
|
|
|
$OPTION{value_type} = { |
|
|
':default' => ['Message::Field::Unstructured'], |
|
|
'date' => ['Message::Field::Date'], |
|
|
}; |
|
|
|
|
|
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
|
|
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
|
|
|
|
|
package Message::Header::Resent; |
|
|
our %OPTION = %Message::Header::RFC822::OPTION; |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:mail-rfc822:resent'; |
|
|
$OPTION{namespace_phname} = 'resent'; |
|
|
$OPTION{namespace_phname_goodcase} = 'Resent'; |
|
|
$OPTION{namespace_phname_regex} = 'resent'; |
|
|
|
|
|
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
|
|
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
|
|
|
|
|
package Message::Header::Content; |
|
|
our %OPTION = %Message::Header::RFC822::OPTION; |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:mail-mime-entity'; |
|
|
$OPTION{namespace_phname} = 'content'; |
|
|
$OPTION{namespace_phname_goodcase} = 'Content'; |
|
|
$OPTION{namespace_phname_regex} = 'content'; |
|
|
|
|
|
$OPTION{goodcase} = { |
|
|
'id' => 'ID', |
|
|
'md5' => 'MD5', |
|
|
'sgml-entity' => 'SGML-Entity', |
|
|
}; |
|
|
|
|
|
$OPTION{value_type} = { |
|
|
':default' => ['Message::Field::Unstructured'], |
|
|
alias => ['Message::Field::URI'], |
|
|
base => ['Message::Field::URI'], |
|
|
disposition => ['Message::Field::ValueParams'], |
|
|
features => ['Message::Field::Structured'], |
|
|
id => ['Message::Field::MsgID'], |
|
|
length => ['Message::Field::Numval'], |
|
|
location => ['Message::Field::URI'], |
|
|
md5 => ['Message::Field::Structured'], |
|
|
'transfer-encoding' => ['Message::Field::ValueParams'], |
|
|
type => ['Message::Field::ContentType'], |
|
|
}; |
|
|
|
|
|
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
|
|
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
|
|
|
|
74 |
package Message::Header::XCGI; |
package Message::Header::XCGI; |
75 |
our %OPTION = %Message::Header::Default::OPTION; |
our %OPTION = %Message::Header::Default::OPTION; |
76 |
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:http:cgi:x'; |
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:http:cgi:x'; |
83 |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
84 |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
85 |
|
|
86 |
|
|
87 |
|
## |
88 |
|
|
89 |
|
require Message::Header::RFC822; |
90 |
|
|
91 |
=head1 LICENSE |
=head1 LICENSE |
92 |
|
|
93 |
Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>. |
Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>. |