diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-04-14 23:40:50 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-15 21:40:41 +0000 |
commit | 94dd7035021119c19976ce521595a75460510f9c (patch) | |
tree | 3958b6ef00893c73766c84b2bb34c3f6fa398ac9 /lib/Exporter | |
parent | 264cef28e9f800426234a9e31007e10cc2439aa3 (diff) | |
download | perl-94dd7035021119c19976ce521595a75460510f9c.tar.gz |
Testing Exporter
Message-ID: <20010414224050.A1872@blackrider.blackstar.co.uk>
p4raw-id: //depot/perl@9712
Diffstat (limited to 'lib/Exporter')
-rw-r--r-- | lib/Exporter/Heavy.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm index 1305318678..e3fd89770c 100644 --- a/lib/Exporter/Heavy.pm +++ b/lib/Exporter/Heavy.pm @@ -218,11 +218,11 @@ sub require_version { my($self, $wanted) = @_; my $pkg = ref $self || $self; my $version = ${"${pkg}::VERSION"}; - if (!$version or $version < $wanted) { - $version ||= "(undef)"; + 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 &&= " ($file)"; + $file = defined $file ? " ($file)" : ''; require Carp; Carp::croak("$pkg $wanted required--this is only version $version$file") } |