summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-10-05 10:12:23 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-10-05 10:12:23 +0000
commit24d36ab42426bdc56f970717e1bd53949872d097 (patch)
treef4160178b3bea265a7483be5756e85eff7c31274
parent587f1037016de8b1054081650ac04da2b82c6040 (diff)
unique objects only need to override add_object.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index fe24acb2784..7443dceba3b 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.36 2004/10/05 10:09:34 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.37 2004/10/05 10:12:22 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -239,11 +239,10 @@ our @ISA=qw(OpenBSD::PackingElement);
package OpenBSD::PackingElement::Unique;
our @ISA=qw(OpenBSD::PackingElement::Meta);
-sub add
+sub add_object
{
- my ($class, $plist, @args) = @_;
+ my ($self, $plist) = @_;
- my $self = $class->new(@args);
$self->destate($plist->{state});
$plist->addunique($self);
return $self;