diff options
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 4922c4d6b2c..58027a54945 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.34 2004/10/05 10:01:17 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.35 2004/10/05 10:06:14 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -67,11 +67,7 @@ sub category() { 'items' } sub new { my ($class, $args) = @_; - if ($args =~ m|/+$| and defined $class->dirclass()) { - bless { name => $` }, $class->dirclass(); - } else { - bless { name => $args }, $class; - } + bless { name => $args }, $class; } sub clone @@ -83,8 +79,6 @@ sub clone } -sub dirclass() { undef } - sub destate { } @@ -218,6 +212,18 @@ our @ISA=qw(OpenBSD::PackingElement::Object); sub NoDuplicateNames() { 1 } +sub dirclass() { undef } + +sub new +{ + my ($class, $args) = @_; + if ($args =~ m|/+$| and defined $class->dirclass()) { + bless { name => $` }, $class->dirclass(); + } else { + bless { name => $args }, $class; + } +} + # exec/unexec and friends package OpenBSD::PackingElement::Action; our @ISA=qw(OpenBSD::PackingElement::Object); |