diff options
| author | fukachan <fukachan> | 2002-04-03 11:32:57 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-04-03 11:32:57 +0000 |
| commit | c6078a19cf75b629679bf0e511d2804fb3e1b8d5 (patch) | |
| tree | a888f5d4bdac79dabd3563b06f05c5963ccc247b /fml/lib/File/Sequence.pm | |
| parent | 06df1cc364822a8176ea12b4881cd9fbb1d9a881 (diff) | |
| download | fml8-c6078a19cf75b629679bf0e511d2804fb3e1b8d5.tar.gz fml8-c6078a19cf75b629679bf0e511d2804fb3e1b8d5.tar.bz2 fml8-c6078a19cf75b629679bf0e511d2804fb3e1b8d5.zip | |
clean up doc & codes, FNF-ify
Diffstat (limited to 'fml/lib/File/Sequence.pm')
| -rw-r--r-- | fml/lib/File/Sequence.pm | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/fml/lib/File/Sequence.pm b/fml/lib/File/Sequence.pm index 2ee89b1a..901ae9a2 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.20 2002/02/20 11:53:22 tmu Exp $ +# $FML: Sequence.pm,v 1.21 2002/02/27 09:20:34 tmu Exp $ # package File::Sequence; @@ -240,7 +240,7 @@ sub search_max_id } -# Descriptions: search max id number from bottom +# Descriptions: search max id number from the bottom # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none # Return Value: NUM @@ -276,46 +276,44 @@ sub _search_max_id_from_bottom } } -# Descriptions: search max id number from top +# Descriptions: search max id number from the top # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none # Return Value: NUM sub _search_max_id_from_top { - my ($self, $args) = @_; - my ($pebot, $k, $v); - my $unit = 50; - my $debug = 1; + my ($self, $args) = @_; + my ($pebot, $k, $v); + my $unit = 50; + my $debug = 1; - $pebot = $self->get_id(); - print STDERR "get_id ", $pebot, "\n" if $debug; + $pebot = $self->get_id(); + print STDERR "get_id ", $pebot, "\n" if $debug; - if (defined $args->{ hash }) { - my $hash = $args->{ hash }; + if (defined $args->{ hash }) { + my $hash = $args->{ hash }; - print STDERR "0. ", $pebot, "\n" if $debug; + print STDERR "0. ", $pebot, "\n" if $debug; - PEBOT_SEARCH: - while ($pebot > 0) { - last PEBOT_SEARCH if defined $hash->{ $pebot - $unit }; - last PEBOT_SEARCH if(($pebot - $unit) <= 0); - $pebot -= $unit; - print STDERR "1. ", $pebot, "\n" if defined $ENV{'debug'}; - } + PEBOT_SEARCH: + while ($pebot > 0) { + last PEBOT_SEARCH if defined $hash->{ $pebot - $unit }; + last PEBOT_SEARCH if(($pebot - $unit) <= 0); + $pebot -= $unit; + } -# decrement by 1. - while(! defined $hash->{ $pebot - 1 }) { - $pebot--; - return 0 if($pebot <= 0); - print STDERR "2. ", $pebot, "\n" if defined $ENV{'debug'}; - } + # decrement by 1. + while(! defined $hash->{ $pebot - 1 }) { + $pebot--; + return 0 if($pebot <= 0); + } - return $pebot; + return $pebot; - } - else { - warn("no argument"); - } + } + else { + warn("no argument"); + } } |
