summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-09 18:44:07 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-09 18:44:07 +0000
commit2b0ebd1fa6ed628f8df57944f30a65f303c483e5 (patch)
tree1283cb85612f801ffd6e858c1f510800e7cbe095 /perl-install
parent8d71f7e07c4e5413924052e46286ded0788a8b30 (diff)
downloaddrakx-2b0ebd1fa6ed628f8df57944f30a65f303c483e5.tar
drakx-2b0ebd1fa6ed628f8df57944f30a65f303c483e5.tar.gz
drakx-2b0ebd1fa6ed628f8df57944f30a65f303c483e5.tar.bz2
drakx-2b0ebd1fa6ed628f8df57944f30a65f303c483e5.tar.xz
drakx-2b0ebd1fa6ed628f8df57944f30a65f303c483e5.zip
fixed loadO when getFile is not used (local files).
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index bbc6c11ae..d2f1c2496 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -876,7 +876,8 @@ sub loadO {
} else {
-e "$f.pl" and $f .= ".pl" unless -e $f;
- my $fh = -e $f ? do { local *F; open F, $f; *F } : getFile($f) or die _("Error reading file %s", $f);
+ local *F; #- keep it outside the following do else filehandle will be closed before reading.
+ my $fh = -e $f ? do { open F, $f; *F } : getFile($f) or die _("Error reading file %s", $f);
{
local $/ = "\0";
no strict;
@@ -884,9 +885,10 @@ sub loadO {
close $fh;
$@ and die;
}
- add2hash_($o ||= {}, $O);
+ $O and add2hash_($o ||= {}, $O);
}
- bless $o, ref $O;
+ $O and bless $o, ref $O;
+ $o;
}
sub generate_automatic_stage1_params {