web/modules/pxt/PXT/Config.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit fa6a733377357be71bb6744064a615c98172293e Author: Jan Pazdziora jpazdziora@redhat.com Date: Fri Feb 18 10:00:33 2011 +0100
Localize the FH; also use three-parameter open.
diff --git a/web/modules/pxt/PXT/Config.pm b/web/modules/pxt/PXT/Config.pm index b323c1e..fdb4a2a 100644 --- a/web/modules/pxt/PXT/Config.pm +++ b/web/modules/pxt/PXT/Config.pm @@ -67,7 +67,8 @@ sub load_file { my $self = ref $class ? $class : $class->default_config(); my %params = validate(@_, { -filename => 1, -mode => 1 });
- open FH, "<$params{-filename}" + local * FH; + open FH, '<', $params{-filename} or die "Can't open config file '$params{-filename}': $!";
while(<FH>) {
spacewalk-commits@lists.fedorahosted.org