diff options
author | John Peacock <jpeacock@rowman.com> | 2001-11-24 09:27:46 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-24 18:46:31 +0000 |
commit | 4893b054ec6d9c32ea9e41726c628fe57d4d1e52 (patch) | |
tree | 5c2010dccc30a5764c8f363ed6170ea65713f0fb | |
parent | d519172cf18442c74fd007dd9e434cfb4e0d1187 (diff) | |
download | perl-4893b054ec6d9c32ea9e41726c628fe57d4d1e52.tar.gz |
Re: [PATCH] Make Exporter::Heavy use Universal->VERSION()
Message-ID: <3BFFF4B2.40509@rowman.com>
p4raw-id: //depot/perl@13243
-rw-r--r-- | lib/Exporter/Heavy.pm | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm index e3fd89770c..4b1c2e2526 100644 --- a/lib/Exporter/Heavy.pm +++ b/lib/Exporter/Heavy.pm @@ -112,7 +112,7 @@ sub heavy_export { foreach $sym (@imports) { if (!$export_cache->{$sym}) { if ($sym =~ m/^\d/) { - $pkg->require_version($sym); + $pkg->VERSION($sym); # inherit from UNIVERSAL # If the version number was the only thing specified # then we should act as if nothing was specified: if (@imports == 1) { @@ -217,16 +217,7 @@ sub _push_tags { sub require_version { my($self, $wanted) = @_; my $pkg = ref $self || $self; - my $version = ${"${pkg}::VERSION"}; - if (!defined $version or $version < $wanted) { - $version = defined $version ? $version : "(undef)"; - # %INC contains slashes, but $pkg contains double-colons. - my $file = (map {s,::,/,g; $INC{$_}} "$pkg.pm")[0]; - $file = defined $file ? " ($file)" : ''; - require Carp; - Carp::croak("$pkg $wanted required--this is only version $version$file") - } - $version; + return ${pkg}->VERSION($wanted); } 1; |