diff options
| author | fukachan <fukachan> | 2002-06-21 03:54:13 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-06-21 03:54:13 +0000 |
| commit | 68f3459d61839d25876c6d738eb662ffdfe8c16b (patch) | |
| tree | 0d03e7537429899894975f5479ff7f5f05159f4a | |
| parent | f1c00bae73c0e0e04ef554220892cd1936c7a0b1 (diff) | |
| download | fml8-68f3459d61839d25876c6d738eb662ffdfe8c16b.tar.gz fml8-68f3459d61839d25876c6d738eb662ffdfe8c16b.tar.bz2 fml8-68f3459d61839d25876c6d738eb662ffdfe8c16b.zip | |
close write handle and read handle after the write one.
| -rw-r--r-- | fml/lib/IO/Adapter/File.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fml/lib/IO/Adapter/File.pm b/fml/lib/IO/Adapter/File.pm index ffe36c3c..613b5d5c 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.30 2002/06/01 05:02:34 fukachan Exp $ +# $FML: File.pm,v 1.31 2002/06/01 05:09:27 fukachan Exp $ # package IO::Adapter::File; @@ -426,12 +426,12 @@ sub replace $self->open("w"); - my $fh = $self->{ _fh }; + my $rh = $self->{ _fh }; my $wh = $self->{ _wh }; - if (defined $fh) { + if (defined $rh) { FILE_IO: - while (<$fh>) { + while (<$rh>) { if (/$regexp/) { print $wh $value, "\n"; } @@ -439,8 +439,8 @@ sub replace print $wh $_; } } - $fh->close; $wh->close; + $rh->close; } else { $self->error_set("Error: cannot open file=$self->{ _file }"); |
