aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-11-30 15:01:49 +0000
committerThierry Vignaud <tv@mandriva.org>2006-11-30 15:01:49 +0000
commite97d4f976e252c2ee65ac76dc8b4b65962c964f3 (patch)
treef8c814395b51f45acfa258f27920adefa76ef1d1
parentcc2d5936452b6c3dd6ade02c20edfff77187ca99 (diff)
downloadiurt-e97d4f976e252c2ee65ac76dc8b4b65962c964f3.tar
iurt-e97d4f976e252c2ee65ac76dc8b4b65962c964f3.tar.gz
iurt-e97d4f976e252c2ee65ac76dc8b4b65962c964f3.tar.bz2
iurt-e97d4f976e252c2ee65ac76dc8b4b65962c964f3.tar.xz
iurt-e97d4f976e252c2ee65ac76dc8b4b65962c964f3.zip
make enough changes so that perl_chcker run smoothly
-rwxr-xr-xiurt213
1 files changed, 7 insertions, 6 deletions
diff --git a/iurt2 b/iurt2
index 964b8a0..cb6ef0b 100755
--- a/iurt2
+++ b/iurt2
@@ -161,8 +161,9 @@ $run{todo} = [];
"Log file.",
sub {
$run{log} = pop @_;
- open $run{LOG}, ">$run{log}" or die "unable to open $run{log}\n";
- print *{$run{LOG}}, "command line: @ARGV\n";
+ open my $log, ">$run{log}" or die "unable to open $run{log}\n";
+ $run{LOG} = sub { print $log @_ };
+ print *$log, "command line: @ARGV\n";
1;
}, "Log file" ],
[ "m", "media", -1, "<media 1> <media 2> ... <media 3>",
@@ -254,7 +255,7 @@ $run{todo} = [];
);
open(my $LOG, ">&STDERR");
-$run{LOG} = $LOG;
+$run{LOG} = sub { print $LOG @_ };
print "$program_name version $VERSION\n";
#plog_init($program_name, $LOG, $run{verbose}, 1);
@@ -278,7 +279,7 @@ my $configfile = "$HOME/.iurt.$run{distro_tag}.conf";
plog('DEBUG', "load config: $configfile");
my $config;
if (-f $configfile) {
- $config = do $configfile
+ $config = eval(cat_($configfile))
or die "FATAL $program_name: syntax error in $configfile";
} else {
$config = {};
@@ -478,7 +479,7 @@ my $clear_cache = 1;
if (-f $cachefile && $run{use_cache}) {
plog('INFO', "loading cache file $cachefile");
- $cache = do $cachefile
+ $cache = eval(cat_($cachefile))
or plog('ERR', "FATAL: could not load cache $cachefile ($!)");
if (!$cache) {
@@ -494,7 +495,7 @@ if (-f $cachefile && $run{use_cache}) {
}
plog('NOTIFY', "loading alternate cache file $cachefile");
- $cache = do $cachefile
+ $cache = eval(cat_($cachefile))
or plog('ERR', "FATAL: could not load cache $cachefile ($!)");
}
$clear_cache = 0 if $cache;