summaryrefslogtreecommitdiff
path: root/lib/base.pm
diff options
context:
space:
mode:
authorJohn Tobey <jtobey@john-edwin-tobey.org>1999-12-16 15:20:38 -0500
committerGurusamy Sarathy <gsar@cpan.org>2000-01-22 08:42:52 +0000
commitf30a114324770080b9e0b2bcfb9c2278f5e0a290 (patch)
tree3ba5076a9b61ff49fd10c6d071b9e0d6713fa79d /lib/base.pm
parent94f23f413fc20beae3970bde041120ceeceae8e4 (diff)
downloadperl-f30a114324770080b9e0b2bcfb9c2278f5e0a290.tar.gz
[ID 19991216.006] [PATCH 5.005_63] Reloading modules that use 'fields'
Message-Id: <E11ym4U-0000c7-00@einstein.localnet> p4raw-id: //depot/perl@4835
Diffstat (limited to 'lib/base.pm')
-rw-r--r--lib/base.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/base.pm b/lib/base.pm
index 7fb3d2bcb9..cb5840e660 100644
--- a/lib/base.pm
+++ b/lib/base.pm
@@ -44,13 +44,16 @@ L<fields>
package base;
use vars qw($VERSION);
-$VERSION = "1.00";
+$VERSION = "1.01";
sub import {
my $class = shift;
my $fields_base;
+ my $pkg = caller(0);
foreach my $base (@_) {
+ next if $pkg->isa($base);
+ push @{"$pkg\::ISA"}, $base;
unless (exists ${"$base\::"}{VERSION}) {
eval "require $base";
# Only ignore "Can't locate" errors from our eval require.
@@ -79,8 +82,6 @@ sub import {
}
}
}
- my $pkg = caller(0);
- push @{"$pkg\::ISA"}, @_;
if ($fields_base) {
require fields;
fields::inherit($pkg, $fields_base);