diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-11-10 14:32:32 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-11-10 14:32:32 +0000 |
commit | 5bf01bff57af24f7b96755b7366e5507db082909 (patch) | |
tree | 4efc2209e2c951b9a700efefc7b41f422811e3bd /usr.sbin | |
parent | 40c978f2c294a4c9aa76b74c25d73136b694b27a (diff) |
remove dead code: as far as possible, we use only
match_locations/filter_locations since we deal with location.
external API only uses spec->filter(), so we keep that one.
We still need the generic match/filter adapters for Stem searches.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgSpec.pm | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Search.pm | 24 |
2 files changed, 2 insertions, 25 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm index 237b2a68d35..bed26da9138 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PkgSpec.pm,v 1.21 2009/10/11 18:04:41 espie Exp $ +# $OpenBSD: PkgSpec.pm,v 1.22 2009/11/10 14:32:31 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -26,7 +26,6 @@ sub new $spec =~ s/^-//o; bless \$spec, $class; - } sub check_1flavor diff --git a/usr.sbin/pkg_add/OpenBSD/Search.pm b/usr.sbin/pkg_add/OpenBSD/Search.pm index bc3f857bc7a..6f0fbca3197 100644 --- a/usr.sbin/pkg_add/OpenBSD/Search.pm +++ b/usr.sbin/pkg_add/OpenBSD/Search.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Search.pm,v 1.14 2009/11/10 11:36:56 espie Exp $ +# $OpenBSD: Search.pm,v 1.15 2009/11/10 14:32:31 espie Exp $ # # Copyright (c) 2007 Marc Espie <espie@openbsd.org> # @@ -50,12 +50,6 @@ sub match_ref return $self->{spec}->match_ref($r); } -sub match -{ - my ($self, $o) = @_; - return $self->match_ref($o->list); -} - sub match_locations { my ($self, $o) = @_; @@ -161,22 +155,6 @@ sub _keep return $stem =~ /\Q$partial\E/; } -package OpenBSD::Search::Filter; -our @ISA=(qw(OpenBSD::Search)); - -sub new -{ - my ($class, $code) = @_; - - return bless {code => $code}, $class; -} - -sub filter -{ - my ($self, @l) = @_; - return &{$self->{code}}(@l); -} - package OpenBSD::Search::FilterLocation; our @ISA=(qw(OpenBSD::Search)); sub new |