summaryrefslogtreecommitdiff
path: root/fml/lib/File
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-24 12:12:46 +0000
committerfukachan <fukachan>2001-02-24 12:12:46 +0000
commit3e9d47c3af0e9bb0f7be92e183a1526591efb873 (patch)
tree16f5d2c5788ec4c3ced44d5217ec3540a4080094 /fml/lib/File
parentaf8238088c4dcd1d0de438fb82bc9bb1ab189fc3 (diff)
downloadfml8-3e9d47c3af0e9bb0f7be92e183a1526591efb873.tar.gz
fml8-3e9d47c3af0e9bb0f7be92e183a1526591efb873.tar.bz2
fml8-3e9d47c3af0e9bb0f7be92e183a1526591efb873.zip
clean up
Diffstat (limited to 'fml/lib/File')
-rw-r--r--fml/lib/File/Errors.pm40
-rw-r--r--fml/lib/File/Sequence.pm22
-rw-r--r--fml/lib/File/Utils.pm2
3 files changed, 48 insertions, 16 deletions
diff --git a/fml/lib/File/Errors.pm b/fml/lib/File/Errors.pm
index 4d5399a3..fcf07ffd 100644
--- a/fml/lib/File/Errors.pm
+++ b/fml/lib/File/Errors.pm
@@ -19,7 +19,7 @@ require Exporter;
=head1 NAME
-File::Errors.pm - error handling utilities
+File::Errors - error handling utilities
=head1 SYNOPSIS
@@ -39,23 +39,15 @@ When you use Something module,
unless ($obj->error) { $obj->do_somting( ...); };
-=head1 DESCRIPTION
+=head1 METHODS
-=head1 AUTHOR
-
-Ken'ichi Fukamachi
-
-=head1 COPYRIGHT
-
-Copyright (C) 2001 Ken'ichi Fukamachi
+=head2 C<error_reason($message)>
-All rights reserved. This program is free software; you can
-redistribute it and/or modify it under the same terms as Perl itself.
+save $message
-=head1 HISTORY
+=head2 C<error()>
-File::Errors appeared in fml5 mailing list driver package.
-See C<http://www.fml.org/> for more details.
+return $message which is saved by C<error_reason($msg)>.
=cut
@@ -84,4 +76,24 @@ sub error_reset
}
+
+=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
+
+File::Errors appeared in fml5 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+
1;
diff --git a/fml/lib/File/Sequence.pm b/fml/lib/File/Sequence.pm
index e0da18ae..5630cc2b 100644
--- a/fml/lib/File/Sequence.pm
+++ b/fml/lib/File/Sequence.pm
@@ -44,9 +44,19 @@ $id becomes 0, 1, 2, 0, 1, 2...
=head1 DESCRIPTION
+File::Sequence module maintains the sequence number for something,
+for example, the article number.
+
+For extension, you can generate cyclic number by this module.
+If you so, use the C<modulus> parameter in new() method.
+
+
=head2 C<new($args)>
-$args->{ sequence_file } is the file holding the current sequence number.
+$args->{ sequence_file } is the file holding the current sequence
+number.
+$args->{ modulus } is the modulus when you want to get a cyclic
+number.
=head2 C<increment_id([$file])>
@@ -58,6 +68,10 @@ require Exporter;
@ISA = qw(Exporter);
+# Descriptions: constructor
+# Arguments: $self $args
+# Side Effects: object itself holds a few local _variables
+# Return Value: object
sub new
{
my ($self, $args) = @_;
@@ -69,6 +83,12 @@ sub new
}
+# Descriptions: increment sequence
+# Arguments: $self [$file]
+# If $file is not specified,
+# the sequence_file parameter in new().
+# Side Effects: the number holded in $file is incremented
+# Return Value: number (sequence number)
sub increment_id
{
my ($self, $file) = @_;
diff --git a/fml/lib/File/Utils.pm b/fml/lib/File/Utils.pm
index 448bfaa4..e019d689 100644
--- a/fml/lib/File/Utils.pm
+++ b/fml/lib/File/Utils.pm
@@ -20,7 +20,7 @@ require Exporter;
=head1 NAME
-File::Utils.pm - error handling utilities
+File::Utils - error handling utilities
=head1 SYNOPSIS