summaryrefslogtreecommitdiff
path: root/dist/Carp
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2012-02-17 09:20:49 +0000
committerZefram <zefram@fysh.org>2012-02-17 16:53:39 +0000
commit1104801e21d8c54762490527e3ebb196f9ac4144 (patch)
tree3471dfa6e21e73c346770a8d9e40413d80b61061 /dist/Carp
parent18126d98dd72d4ba13a522432703d46bc37850cf (diff)
downloadperl-1104801e21d8c54762490527e3ebb196f9ac4144.tar.gz
in Carp, cope with "_" in $warnings::VERSION
The check for very old versions of warnings was generating a numeric warning on some versions of warnings where $warnings::VERSION isn't a proper number. Oh, the irony. Specifically affected the version of warnings that was bundled with Perl 5.8.9.
Diffstat (limited to 'dist/Carp')
-rw-r--r--dist/Carp/lib/Carp.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index e7c4694278..fc2eab3973 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -402,7 +402,8 @@ sub trusts_directly {
: @{"$class\::ISA"};
}
-if(!defined($warnings::VERSION) || $warnings::VERSION < 1.03) {
+if(!defined($warnings::VERSION) ||
+ do { no warnings "numeric"; $warnings::VERSION < 1.03 }) {
# Very old versions of warnings.pm import from Carp. This can go
# wrong due to the circular dependency. If Carp is invoked before
# warnings, then Carp starts by loading warnings, then warnings