aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-17 16:04:58 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-12-17 16:04:58 +0000
commitcb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4 (patch)
treecc7fbeaf8dd11edd8f5957388e70794ecf9680c9
parentc3dec4b8b1d572b16b41adf5275efa4fdf42d4e9 (diff)
downloadrpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar
rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar.gz
rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar.bz2
rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.tar.xz
rpmtools-cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4.zip
perl_checker fixes
-rwxr-xr-xpackdrake7
1 files changed, 4 insertions, 3 deletions
diff --git a/packdrake b/packdrake
index 2a9e670..22a5469 100755
--- a/packdrake
+++ b/packdrake
@@ -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";
}