summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-09-04 11:55:15 +0200
committerMichael Schroeder <mls@suse.de>2014-09-04 11:55:15 +0200
commit34d3421a2f3cd45f40b3aea867cafac923af6d8a (patch)
tree5d2376ec629b65d02899553addf6bb2f9eb2953b
parent93c73e9e0744b532b5ce2c923b3445644451b81e (diff)
simplify getopt handling
Also gets rid of those 'odd number in hash assignment' warnings.
-rw-r--r--Build/Rpm.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Build/Rpm.pm b/Build/Rpm.pm
index cb50964..1f775b3 100644
--- a/Build/Rpm.pm
+++ b/Build/Rpm.pm
@@ -130,7 +130,8 @@ sub grabargs {
my %m;
$m{'0'} = $macname;
$m{'**'} = join(' ', @args);
- my %go = (split(/(:?)/, $getopt, -1), undef);
+ my %go;
+ %go = ($getopt =~ /(.)(:*)/sg) if defined $getopt;
while (@args && $args[0] =~ s/^-//) {
my $o = shift @args;
last if $o eq '-';