diff options
| author | fukachan <fukachan> | 2002-12-23 14:35:32 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-12-23 14:35:32 +0000 |
| commit | ead7d1b29d63593dd5a582cb855d91bab659511d (patch) | |
| tree | 1659008344ce54d7b7dff21cdff0fc649dce39b8 /fml/lib/File | |
| parent | c6969291f9a15023ce50245ee9f54a3021b64ce7 (diff) | |
| download | fml8-ead7d1b29d63593dd5a582cb855d91bab659511d.tar.gz fml8-ead7d1b29d63593dd5a582cb855d91bab659511d.tar.bz2 fml8-ead7d1b29d63593dd5a582cb855d91bab659511d.zip | |
fix comments.
clean up the return value by removing \s*..
Diffstat (limited to 'fml/lib/File')
| -rw-r--r-- | fml/lib/File/Sequence.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fml/lib/File/Sequence.pm b/fml/lib/File/Sequence.pm index 90364bcc..6692f2bc 100644 --- a/fml/lib/File/Sequence.pm +++ b/fml/lib/File/Sequence.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Sequence.pm,v 1.28 2002/10/28 10:03:26 tmu Exp $ +# $FML: Sequence.pm,v 1.29 2002/11/17 08:00:37 fukachan Exp $ # package File::Sequence; @@ -97,7 +97,7 @@ sub new # Descriptions: increment the sequence number # Arguments: OBJ($self) [STR($file)] # If $file is not specified, -# the sequence_file parameter in new(). +# use the sequence_file parameter in new(). # Side Effects: the number holded in $file is incremented # Return Value: NUM(sequence number) sub increment_id @@ -127,9 +127,11 @@ sub increment_id use IO::Adapter::AtomicFile; my ($rh, $wh) = IO::Adapter::AtomicFile->rw_open($seq_file); + # XXX-TODO: share codes between get_id() and increment_id() . # read the current sequence number if (defined $rh) { $id = $rh->getline; + $id =~ s/[\s\r\n]*$//; $rh->close; } else { @@ -161,7 +163,7 @@ sub increment_id } -# Descriptions: get sequence +# Descriptions: get sequence number. # Arguments: OBJ($self) [STR($file)] # If $file is not specified, # the sequence_file parameter in new() is used. |
