summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 9677790497d..bad5faa5e2d 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.97 2007/05/01 20:01:55 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.98 2007/05/02 10:30:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -1306,6 +1306,12 @@ our @ISA=qw(OpenBSD::PackingElement);
my $warned;
+sub new
+{
+ my ($class, $k, $args) = @_;
+ bless { keyword => $k, name => $args }, $class;
+}
+
sub add
{
my ($o, $plist, @args) = @_;
@@ -1314,9 +1320,17 @@ sub add
print STDERR "Warning: obsolete construct: \@$keyword @args\n";
$warned->{$keyword} = 1;
}
+ my $o2 = OpenBSD::PackingElement::Old->new($keyword, @args);
+ $o2->add_object($plist);
$plist->{deprecated} = 1;
}
+sub keyword
+{
+ my $self = shift;
+ return $self->{keyword};
+}
+
sub register_old_keyword
{
my ($class, $k) = @_;