From 7cbfb8f6aa04b0c6a6c6967c28fc514e164f251b Mon Sep 17 00:00:00 2001 From: j pipkin Date: Fri, 20 Sep 2013 13:56:07 -0500 Subject: 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. --- SBO-Lib/lib/SBO/Lib.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'SBO-Lib/lib/SBO/Lib.pm') 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; } -- cgit v1.2.3