diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-17 16:04:58 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-17 16:04:58 +0000 |
commit | cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4 (patch) | |
tree | cc7fbeaf8dd11edd8f5957388e70794ecf9680c9 /packdrake | |
parent | c3dec4b8b1d572b16b41adf5275efa4fdf42d4e9 (diff) | |
download | rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar.gz rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar.bz2 rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar.xz rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.zip |
perl_checker fixes
Diffstat (limited to 'packdrake')
-rwxr-xr-x | packdrake | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -37,11 +37,11 @@ usage: sub main { my ($file, $mode, $dir, $size, $method, $compress, $uncompress, $ratio, $quiet); my @nextargv = (\$file); - my @list = (); + my @list; #- some quite useful error message. my $error_mode = "packdrake: choose only --build, --extract, --list or --cat\n"; - for (@_) { + foreach (@_) { /^--help$/ and do { usage; next }; /^--build$/ and do { $mode and die $error_mode; $mode = "build"; @nextargv = (\$file); next }; /^--extract$/ and do { $mode and die $error_mode; $mode = "extract"; @nextargv = (\$file, \$dir); next }; @@ -66,7 +66,8 @@ sub main { $mode =~ /extract|list|cat/ or @nextargv or die qq(packdrake: unknown option "$_", check usage with --help\n); - my $ref = shift @nextargv; $ref ? $$ref = $_ : push @list, $_; + my $ref = shift @nextargv; + $ref ? ($$ref = $_) : push @list, $_; $mode ||= "list"; } |