summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2019-08-20 11:03:06 +0000
committerMarc Espie <espie@cvs.openbsd.org>2019-08-20 11:03:06 +0000
commitb93b5dd447a3075c1257ed2e1f5ce7e14b99e153 (patch)
treedbe0546bd489b0f38f79faffad6e042b8ceb221a /regress
parentd57f5683b5de03a6453fc2817bcdc34f0cbd594e (diff)
use wrapper module instead of rolling our own
Diffstat (limited to 'regress')
-rwxr-xr-xregress/usr.sbin/pkg_add/inject-order13
1 files changed, 6 insertions, 7 deletions
diff --git a/regress/usr.sbin/pkg_add/inject-order b/regress/usr.sbin/pkg_add/inject-order
index 6da8df18930..51f8ec47a23 100755
--- a/regress/usr.sbin/pkg_add/inject-order
+++ b/regress/usr.sbin/pkg_add/inject-order
@@ -1,6 +1,6 @@
#! /usr/bin/perl
-# $OpenBSD: inject-order,v 1.1 2019/07/09 10:48:30 espie Exp $
+# $OpenBSD: inject-order,v 1.2 2019/08/20 11:03:05 espie Exp $
use warnings;
use strict;
@@ -10,17 +10,16 @@ use strict;
use OpenBSD::Dependencies;
package OpenBSD::Dependencies::SolverBase;
+use Wrapper;
-{
-no warnings qw(redefine);
-sub dependencies
-{
+wrap('dependencies',
+ sub {
+ my $original = shift;
my $self = shift;
my @l = keys %{$self->{all_dependencies}};
my $v = 'ghostscript-9.07p7';
@l = ((grep {$_ ne $v} @l) , (grep {$_ eq $v} @l));
return @l;
-}
-}
+ });
1;