summaryrefslogtreecommitdiff
path: root/fml/lib/IO/Adapter/File.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-07-25 00:11:23 +0000
committerfukachan <fukachan>2002-07-25 00:11:23 +0000
commitaf65e92f924fd25bb6a9ee75acccb4162620295c (patch)
treedf8793da3ded98eab5ccacaaf745c355a88063a1 /fml/lib/IO/Adapter/File.pm
parent7153890cef0f521c2fa967c61a18b4e68da20ec4 (diff)
downloadfml8-af65e92f924fd25bb6a9ee75acccb4162620295c.tar.gz
fml8-af65e92f924fd25bb6a9ee75acccb4162620295c.tar.bz2
fml8-af65e92f924fd25bb6a9ee75acccb4162620295c.zip
bug fix so that getline() returns undef if not opened
Diffstat (limited to 'fml/lib/IO/Adapter/File.pm')
-rw-r--r--fml/lib/IO/Adapter/File.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/fml/lib/IO/Adapter/File.pm b/fml/lib/IO/Adapter/File.pm
index 9ff37ee4..7d8b6b55 100644
--- a/fml/lib/IO/Adapter/File.pm
+++ b/fml/lib/IO/Adapter/File.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: File.pm,v 1.33 2002/07/24 09:29:39 fukachan Exp $
+# $FML: File.pm,v 1.34 2002/07/24 11:05:50 fukachan Exp $
#
package IO::Adapter::File;
@@ -201,7 +201,13 @@ sub getline
{
my ($self) = @_;
my $fh = $self->{_fh};
- $fh->getline;
+
+ if (defined $fh) {
+ $fh->getline;
+ }
+ else {
+ return undef;
+ }
}