diff options
author | j pipkin <j@dawnrazor.net> | 2013-09-22 07:52:03 -0500 |
---|---|---|
committer | j pipkin <j@dawnrazor.net> | 2013-09-22 07:52:03 -0500 |
commit | 4081d3d6b22f1db7d14a7a725f592d73602ffe48 (patch) | |
tree | dcfe253ec24ce32221f08ac893f7c2b9dce82517 /SBO-Lib/lib/SBO/Lib.pm | |
parent | 5bd0ec56ac20709daa775427eb7e5070178839e9 (diff) | |
parent | 91a2e19799bdb10a37b9b48d943f00cd87b71ba9 (diff) | |
download | sbotools2-4081d3d6b22f1db7d14a7a725f592d73602ffe48.tar.xz |
Merge branch 'smartmatch'
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index d0e42c4..ed5f74c 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -191,7 +191,7 @@ sub get_slack_version() { close $fh; my $version = ($line =~ /\s+(\d+[^\s]+)$/)[0]; usage_error "Unsupported Slackware version: $version\n" - unless $version ~~ %supported; + unless $supported{$version}; return $supported{$version}; } @@ -882,7 +882,7 @@ sub make_clean { -d "$tmpsbo/package-$args{SBO}"; # clean up after convertpkg-compat32 remove_tree("$tmpd/package-$args{SBO}") if - -d "$tmpd/package-$args{SBO}" and $args{SBO} ~~ /-compat32$/; + -d "$tmpd/package-$args{SBO}" and $args{SBO} =~ /-compat32$/; return 1; } @@ -970,8 +970,11 @@ sub merge_queues { my $queue_a = $_[0]; my $queue_b = $_[1]; + my %queue_a; + $queue_a{$_} = 1 for @$queue_a; + for my $item (reverse @$queue_b) { - push @$queue_a, $item unless $item ~~ @$queue_a; + push @$queue_a, $item unless $queue_a{$item}; } return $queue_a; } |