From cd657b38b058fd0db8747ee5cb4eaa718b9d6502 Mon Sep 17 00:00:00 2001 From: fukachan Date: Sat, 15 Mar 2003 09:02:59 +0000 Subject: return 0 if sequence file not found --- fml/lib/File/Sequence.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fml/lib/File') diff --git a/fml/lib/File/Sequence.pm b/fml/lib/File/Sequence.pm index f05b2574..e9e907b0 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.31 2003/01/26 05:57:12 fukachan Exp $ +# $FML: Sequence.pm,v 1.32 2003/01/27 03:53:53 fukachan Exp $ # package File::Sequence; @@ -130,7 +130,7 @@ sub increment_id # XXX-TODO: share codes between get_id() and increment_id() . # read the current sequence number if (defined $rh) { - $id = $rh->getline; + $id = $rh->getline() || 0; $id =~ s/[\s\r\n]*$//; $rh->close; } -- cgit v1.2.1