diff options
author | j pipkin <j@dawnrazor.net> | 2013-09-20 13:56:07 -0500 |
---|---|---|
committer | j pipkin <j@dawnrazor.net> | 2013-09-20 13:56:07 -0500 |
commit | 7cbfb8f6aa04b0c6a6c6967c28fc514e164f251b (patch) | |
tree | 68c94bec8942e02b7c8caf520bedf8478bdf76bb /SBO-Lib/lib/SBO/Lib.pm | |
parent | 4f68deb678ee9e8c5116435459914120560bef49 (diff) | |
download | sbotools2-7cbfb8f6aa04b0c6a6c6967c28fc514e164f251b.tar.xz |
SBO-Lib/lib/SBO/Lib.pm, sboinstall, sboremove, sboupgrade: remove smartmatch
usage; t/test.t: remove smartmatch usage, fix bug where we were testing
@symlinks as though its contents would be in a specific order whereas actually
it is populated from a hash.
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 55b57ec..1351b61 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; } |