use base classes more

This commit is contained in:
espie 2004-10-05 20:40:11 +00:00
parent 216728c1a7
commit b71495c6f2

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl
# $OpenBSD: check-common-dirs,v 1.3 2004/09/14 22:31:48 espie Exp $
# $OpenBSD: check-common-dirs,v 1.4 2004/10/05 20:40:11 espie Exp $
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
@ -51,7 +51,7 @@ sub check_common_dirs
main::register_dir(dirname($d), $t->{need_dirs});
}
package OpenBSD::PackingElement::DirBase;
package OpenBSD::PackingElement::DirlikeObject;
sub check_common_dirs
{
my ($item, $t) = @_;
@ -59,12 +59,6 @@ sub check_common_dirs
$t->{dirs}->{$d} = 1;
}
package OpenBSD::PackingElement::DirRm;
sub check_common_dirs
{
&OpenBSD::PackingElement::DirBase::check_common_dirs;
}
package OpenBSD::PackingElement::PkgDep;
sub check_common_dirs
{
@ -72,19 +66,13 @@ sub check_common_dirs
$t->{deps}->{$item->{name}} = 1;
}
package OpenBSD::PackingElement::LibDepend;
package OpenBSD::PackingElement::Depend;
sub check_common_dirs
{
my ($item, $t) = @_;
$t->{deps}->{$item->{def}} = 1;
}
package OpenBSD::PackingElement::NewDepend;
sub check_common_dirs
{
&OpenBSD::PackingElement::LibDepend::check_common_dirs;
}
package main;
sub analyze