summaryrefslogtreecommitdiff
path: root/fml/lib/File/Sequence.pm
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/Sequence.pm
parentaf8238088c4dcd1d0de438fb82bc9bb1ab189fc3 (diff)
downloadfml8-3e9d47c3af0e9bb0f7be92e183a1526591efb873.tar.gz
fml8-3e9d47c3af0e9bb0f7be92e183a1526591efb873.tar.bz2
fml8-3e9d47c3af0e9bb0f7be92e183a1526591efb873.zip
clean up
Diffstat (limited to 'fml/lib/File/Sequence.pm')
-rw-r--r--fml/lib/File/Sequence.pm22
1 files changed, 21 insertions, 1 deletions
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) = @_;