diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-01 20:01:56 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-01 20:01:56 +0000 |
commit | cc0e6ce786a4ac7ee002f9d6c405d26ecfb3adb4 (patch) | |
tree | bc747fb5c7935df6bca568d75b3cc64fe7e7e558 | |
parent | 51a6c71c035466837fdbbef037b93d33f0dee6d8 (diff) |
simplify signature computation slightly
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 4fd1a192554..9677790497d 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.96 2007/05/01 19:48:30 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.97 2007/05/01 20:01:55 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -248,7 +248,7 @@ our @ISA=qw(OpenBSD::PackingElement::Meta); sub signature { my ($self, $hash) = @_; - $hash->{$self->{def}} = 1; + $hash->{$self->{name}} = 1; } # Abstract class for all file-like elements @@ -661,7 +661,8 @@ sub new { my ($class, $args) = @_; my ($pkgpath, $pattern, $def) = split /\:/, $args; - bless { pkgpath => $pkgpath, pattern => $pattern, def => $def }, $class; + bless { name => $def, pkgpath => $pkgpath, pattern => $pattern, + def => $def }, $class; } sub stringize($) @@ -677,12 +678,6 @@ sub category() { "wantlib" } sub keyword() { "wantlib" } __PACKAGE__->register_with_factory; -sub signature -{ - my ($self, $hash) = @_; - $hash->{$self->{name}} = 1; -} - package OpenBSD::PackingElement::PkgPath; our @ISA=qw(OpenBSD::PackingElement::Meta); |