summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-19 01:30:25 +0000
committerfukachan <fukachan>2001-02-19 01:30:25 +0000
commitabe1b2f84bcbf6ef6a62d8912cae35a116fad10c (patch)
treebccf49d0947d7bc2eccdf8e7923cabaa00021cfe
parentb6f84022326702dbf8baec21bb7e15bb033c0a6b (diff)
downloadfml8-abe1b2f84bcbf6ef6a62d8912cae35a116fad10c.tar.gz
fml8-abe1b2f84bcbf6ef6a62d8912cae35a116fad10c.tar.bz2
fml8-abe1b2f84bcbf6ef6a62d8912cae35a116fad10c.zip
clean up documents
-rw-r--r--fml/lib/MailingList/Delivery.pm80
-rw-r--r--fml/lib/Tie/LogFileDB.pm86
-rw-r--r--fml/lib/__template.pm36
3 files changed, 100 insertions, 102 deletions
diff --git a/fml/lib/MailingList/Delivery.pm b/fml/lib/MailingList/Delivery.pm
index 986e3e26..9ffed9f4 100644
--- a/fml/lib/MailingList/Delivery.pm
+++ b/fml/lib/MailingList/Delivery.pm
@@ -15,41 +15,6 @@ use vars qw(@ISA @EXPORT @EXPORT_OK);
use Carp;
use IO::Socket;
-require Exporter;
-@ISA = qw(Exporter);
-
-
-sub new
-{
- my ($self, $args) = @_;
- my $protocol = $args->{ protocol } || 'SMTP';
- my $pkg = 'MailingList::SMTP';
-
- if ($protocol eq 'SMTP') {
- $pkg = 'MailingList::SMTP';
- }
- elsif ($protocol eq 'ESMTP') {
- $pkg = 'MailingList::EMTP';
- }
- elsif ($protocol eq 'LMTP') {
- $pkg = 'MailingList::LMTP';
- }
- else {
- croak("unknown protocol=$protocol");
- return undef;
- }
-
- unshift(@ISA, $pkg);
- eval qq{require $pkg; $pkg->import();};
- unless ($@) {
- $self->SUPER::new($args);
- }
- else {
- croak("fail to load $pkg");
- return undef;
- }
-}
-
=head1 NAME
@@ -104,12 +69,49 @@ C<LMTP> classes.
Delivery --> ESMTP LMTP
-=head1 METHOD
+=head1 METHODS
-=item C<new()>
+=item C<new($args)>
-constructor as an adapter.
-The request is forwarded up to SUPER class.
+constructor. The request is forwarded up to SUPER class.
+
+=cut
+
+
+require Exporter;
+@ISA = qw(Exporter);
+
+
+sub new
+{
+ my ($self, $args) = @_;
+ my $protocol = $args->{ protocol } || 'SMTP';
+ my $pkg = 'MailingList::SMTP';
+
+ if ($protocol eq 'SMTP') {
+ $pkg = 'MailingList::SMTP';
+ }
+ elsif ($protocol eq 'ESMTP') {
+ $pkg = 'MailingList::EMTP';
+ }
+ elsif ($protocol eq 'LMTP') {
+ $pkg = 'MailingList::LMTP';
+ }
+ else {
+ croak("unknown protocol=$protocol");
+ return undef;
+ }
+
+ unshift(@ISA, $pkg);
+ eval qq{require $pkg; $pkg->import();};
+ unless ($@) {
+ $self->SUPER::new($args);
+ }
+ else {
+ croak("fail to load $pkg");
+ return undef;
+ }
+}
=head1 AUTHOR
diff --git a/fml/lib/Tie/LogFileDB.pm b/fml/lib/Tie/LogFileDB.pm
index fdb196a3..0dcb4ade 100644
--- a/fml/lib/Tie/LogFileDB.pm
+++ b/fml/lib/Tie/LogFileDB.pm
@@ -14,10 +14,50 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+=head1 NAME
+
+Tie::LogFileDB - hash emulation for a log structered file
+
+=head1 SYNOPSIS
+
+ use Tie::LogFileDB;
+ $db = new Tie::LogFileDB { file => 'cache.txt' };
+
+ # all entries with the key = 'rudo'
+ @values = $db->grep( rudo );
+
+or
+
+ use Tie::LogFileDB;
+ tie %db, 'Tie::LogFileDB', { file => 'cache.txt' };
+ print $db{ rudo }, "\n";
+
+where cache file "cache.txt" format is "key value" for each line.
+For example
+
+ rudo teddy bear
+ kenken north fox
+ .....
+
+By default, FETCH() returns the first value with the key.
+
+ use Tie::LogFileDB;
+ tie %db, 'Tie::LogFileDB', { first_match => 1, file => 'cache.txt' };
+ print $db{ rudo }, "\n";
+
+if you find the latest value (so at the later line somewhere in the
+file) for the $key
+
+ use Tie::LogFileDB;
+ tie %db, 'Tie::LogFileDB', { last_match => 1, file => 'cache.txt' };
+ print $db{ rudo }, "\n";
+
+=cut
+
+
require Exporter;
@ISA = qw(Exporter);
-
sub new
{
my ($self, $args) = @_;
@@ -141,50 +181,6 @@ sub _fetch
}
-=head1 NAME
-
-Tie::LogFileDB.pm - hash emulation for a log structered file
-
-=head1 SYNOPSIS
-
- use Tie::LogFileDB;
- $db = new Tie::LogFileDB { file => 'cache.txt' };
-
- # all entries with the key = 'rudo'
- @values = $db->grep( rudo );
-
-or
-
- use Tie::LogFileDB;
- tie %db, 'Tie::LogFileDB', { file => 'cache.txt' };
- print $db{ rudo }, "\n";
-
-where cache file "cache.txt" format is "key value" for each line.
-For example
-
- rudo teddy bear
- kenken north fox
- .....
-
-By default, FETCH() returns the first value with the key.
-
- use Tie::LogFileDB;
- tie %db, 'Tie::LogFileDB', { first_match => 1, file => 'cache.txt' };
- print $db{ rudo }, "\n";
-
-if you find the latest value (so at the later line somewhere in the
-file) for the $key
-
- use Tie::LogFileDB;
- tie %db, 'Tie::LogFileDB', { last_match => 1, file => 'cache.txt' };
- print $db{ rudo }, "\n";
-
-
-
-=head1 DESCRIPTION
-
-... not yet ...
-
=head1 AUTHOR
Ken'ichi Fukamachi
diff --git a/fml/lib/__template.pm b/fml/lib/__template.pm
index af8dfbde..1cba1c83 100644
--- a/fml/lib/__template.pm
+++ b/fml/lib/__template.pm
@@ -8,11 +8,26 @@
# $FML$
#
-package FML::__HERE_IS_YOUR_MODULE_NAME__;
+package FML::__MODULE_NAME__;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+=head1 NAME
+
+FML::__MODULE_NAME__ - what is this
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=head1 METHODS
+
+=head2 C<new()>
+
+=cut
+
+
require Exporter;
@ISA = qw(Exporter);
@@ -26,22 +41,6 @@ sub new
}
-=head1 NAME
-
-FML::__HERE_IS_YOUR_MODULE_NAME__ - what is this
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-=head1 CLASSES
-
-=head1 METHODS
-
-=item C<new()>
-
-... what is this ...
-
=head1 AUTHOR
__YOUR_NAME__
@@ -55,9 +54,10 @@ redistribute it and/or modify it under the same terms as Perl itself.
=head1 HISTORY
-FML::__HERE_IS_YOUR_MODULE_NAME__ appeared in fml5 mailing list driver package.
+FML::__MODULE_NAME__ appeared in fml5 mailing list driver package.
See C<http://www.fml.org/> for more details.
=cut
+
1;