summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Article
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-04-22 12:20:07 +0000
committerfukachan <fukachan>2004-04-22 12:20:07 +0000
commit479a11a060c1c15e807f4fcd27c3e3cc41217426 (patch)
tree43803c8422e7c8b16386e528ab70fc11e6df0008 /fml/lib/FML/Article
parente370d5b4027ba345c789b582dbc1ed3de282c6f8 (diff)
downloadfml8-479a11a060c1c15e807f4fcd27c3e3cc41217426.tar.gz
fml8-479a11a060c1c15e807f4fcd27c3e3cc41217426.tar.bz2
fml8-479a11a060c1c15e807f4fcd27c3e3cc41217426.zip
bug fix: need open() before getline()
Diffstat (limited to 'fml/lib/FML/Article')
-rw-r--r--fml/lib/FML/Article/Sequence.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/fml/lib/FML/Article/Sequence.pm b/fml/lib/FML/Article/Sequence.pm
index 6fe28e04..d698363f 100644
--- a/fml/lib/FML/Article/Sequence.pm
+++ b/fml/lib/FML/Article/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.10 2004/04/11 13:02:14 fukachan Exp $
+# $FML: Sequence.pm,v 1.11 2004/04/12 10:27:08 fukachan Exp $
#
package FML::Article::Sequence;
@@ -109,6 +109,7 @@ sub get_number_from_map
use IO::Adapter;
my $io = new IO::Adapter $map;
if (defined $io) {
+ $io->open();
$n = $io->getline() || 0;
$n =~ s/^\s*//;
$n =~ s/\s*$//;
@@ -120,6 +121,9 @@ sub get_number_from_map
return 0;
}
}
+ else {
+ warn("cannot open map=$map");
+ }
return 0;
}