summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-10-04 12:16:32 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-10-04 12:16:32 +0000
commit45e89d9aa25124d0c2e2386483f50dfbd2d6e14e (patch)
tree857edd12113c507dc504eb1ce31425ef2c782279 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parent79f2ba5652e29c6cdd6d8a853b808d3e7b693c52 (diff)
basic class hierarchy to cut up packing-list items into better groups.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm34
1 files changed, 32 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 42dc0579759..8ac788b582b 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.30 2004/10/04 12:09:07 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.31 2004/10/04 12:16:31 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -200,8 +200,38 @@ sub fullname($)
return $_[0]->{fullname};
}
-# Abstract class for all file-like elements
+# Basic class hierarchy
+
+# various stuff that's only linked to objects before/after them
+# this class doesn't have real objects: no valid new nor clone...
+package OpenBSD::PackingElement::Annotation;
+our @ISA=qw(OpenBSD::PackingElement);
+sub new { die "Can't create annotation objects" }
+
+# concrete objects
+package OpenBSD::PackingElement::Object;
+our @ISA=qw(OpenBSD::PackingElement);
+
+package OpenBSD::PackingElement::FileObject;
+our @ISA=qw(OpenBSD::PackingElement::Object);
+# exec/unexec and friends
+package OpenBSD::PackingElement::Action;
+our @ISA=qw(OpenBSD::PackingElement::Object);
+
+# persistent state for following objects
+package OpenBSD::PackingElement::State;
+our @ISA=qw(OpenBSD::PackingElement::Object);
+
+# meta information, stored elsewhere
+package OpenBSD::PackingElement::Meta;
+our @ISA=qw(OpenBSD::PackingElement);
+
+# all dependency information
+package OpenBSD::PackingElement::Depend;
+our @ISA=qw(OpenBSD::PackingElement::Meta);
+
+# Abstract class for all file-like elements
package OpenBSD::PackingElement::FileBase;
our @ISA=qw(OpenBSD::PackingElement);
use File::Spec;