From a2cc40f14d32f8f38fff0391d91ea9c0d64315ec Mon Sep 17 00:00:00 2001 From: fukachan Date: Sun, 25 Feb 2001 06:43:41 +0000 Subject: clean up documents move FML::String to Dialect::ISO2022JP (Dialect::Japanese::String) --- fml/lib/Dialect/ISO2022JP.pm | 32 ++++++++++-- fml/lib/Dialect/Japanese/String.pm | 91 ++++++++++++++++++++++++++++++++++ fml/lib/Dialect/Japanese/index.ja.html | 6 +++ fml/lib/FML/Date.pm | 25 +++++++++- fml/lib/FML/String.pm | 91 ---------------------------------- fml/lib/FML/index.ja.html | 6 --- fml/lib/IO/Adapter/File.pm | 87 ++++++++++++++++++++++++++------ fml/lib/IO/Adapter/LDAP.pm | 12 ++--- fml/lib/IO/File/Atomic.pm | 59 ++++++++++++++++++++-- fml/lib/MailingList/Delivery.pm | 6 +-- fml/lib/MailingList/SMTP.pm | 2 +- regress/base/string.pl | 17 ++++++- regress/simulation/todo/doc | 6 --- 13 files changed, 295 insertions(+), 145 deletions(-) create mode 100644 fml/lib/Dialect/Japanese/String.pm delete mode 100644 fml/lib/FML/String.pm diff --git a/fml/lib/Dialect/ISO2022JP.pm b/fml/lib/Dialect/ISO2022JP.pm index 4e67cfcc..f56f0615 100644 --- a/fml/lib/Dialect/ISO2022JP.pm +++ b/fml/lib/Dialect/ISO2022JP.pm @@ -13,11 +13,7 @@ package Dialect::ISO2022JP; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); use Carp; -use Dialect::Japanese::Utils qw(is_iso2022jp_string); -require Exporter; -@ISA = qw(Dialect::Japanese::Utils Exporter); -@EXPORT_OK = @Dialect::Japanese::Utils::EXPORT_OK; =head1 NAME @@ -28,9 +24,35 @@ Dialect::ISO2022JP - adapter for Dialect::Japanese use Dialect::ISO2022JP qw(is_iso2022jp_string); if ( is_iso2022jp_string($string) ) { do_something_if_Japanese;} + use Dialect::ISO2022JP qw(STR2EUC); + $euc_string = STR2EUC( $string ); + +=cut + + +use Dialect::Japanese::Utils qw(is_iso2022jp_string); +use Dialect::Japanese::String qw(STR2JIS STR2EUC STR2SJIS); + +require Exporter; +@ISA = qw(Dialect::Japanese::Utils Dialect::Japanese::String Exporter); +push(@EXPORT_OK, @Dialect::Japanese::Utils::EXPORT_OK); +push(@EXPORT_OK, @Dialect::Japanese::String::EXPORT_OK); + + +=head1 METHODS + +=head2 C + +See L + +=head2 C C C + +See L + =head1 SEE ALSO -L +L, +L =head1 AUTHOR diff --git a/fml/lib/Dialect/Japanese/String.pm b/fml/lib/Dialect/Japanese/String.pm new file mode 100644 index 00000000..4e748e4b --- /dev/null +++ b/fml/lib/Dialect/Japanese/String.pm @@ -0,0 +1,91 @@ +#-*- perl -*- +# +# Copyright (C) 2000 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $Id$ +# $FML$ +# + +package Dialect::Japanese::String; +use strict; +use Carp; +use vars qw(@ISA @EXPORT @EXPORT_OK); + +=head1 NAME + +Dialect::Japanese::String -- utilities to manipulate strings + +=head1 SYNOPSIS + + use Dialect::Japanese::String qw(STR2JIS); + $euc_str = STR2JIS($str); + +=head1 METHOD + +=head2 C + +convert CHARSET of the given string to JIS. + +=head2 C + +convert CHARSET of the given string to EUC. + +=head2 C + +convert CHARSET of the given string to SJIS. + +=cut + + +require Exporter; +@ISA = qw(Exporter); +@EXPORT_OK = qw(STR2JIS STR2EUC STR2SJIS); + +use Jcode; + + +sub STR2EUC +{ + my ($str) = @_; + &Jcode::convert(\$str, 'euc'); + $str; +} + + +sub STR2JIS +{ + my ($str) = @_; + &Jcode::convert(\$str, 'jis'); + $str; +} + + +sub STR2SJIS +{ + my ($str) = @_; + &Jcode::convert(\$str, 'sjis'); + $str; +} + + +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 Ken'ichi Fukamachi + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +=head1 HISTORY + +Dialect::Japanese::String appeared in fml5 mailing list driver package. +See C for more details. + +=cut + +1; diff --git a/fml/lib/Dialect/Japanese/index.ja.html b/fml/lib/Dialect/Japanese/index.ja.html index 8ec9e260..cb59d549 100644 --- a/fml/lib/Dialect/Japanese/index.ja.html +++ b/fml/lib/Dialect/Japanese/index.ja.html @@ -13,6 +13,12 @@ Dialect/Japanese::* classes
+
+ Dialect::Japanese::String +[source] + +[doc] +
Dialect::Japanese::Subject [source] diff --git a/fml/lib/FML/Date.pm b/fml/lib/FML/Date.pm index 1e871aba..eeea51da 100644 --- a/fml/lib/FML/Date.pm +++ b/fml/lib/FML/Date.pm @@ -35,9 +35,10 @@ The style you use follows: precise_current_time 20010107210619 -=head1 METHOD +=head1 METHODS You can also method like $date->$style() style. +specify the C