Subject: | Report Pod::Coverage load failure |
If Pod::Coverage fails to load, the error is ignored. It should only be ignored if the failure is a failure to locate it. Otherwise, it should stop loading Devel::Cover. Possibly, that could be downgraded to a warn.
The reason for this is that I've just seen this error message:
Pod::Coverage does not define $Pod::Coverage::VERSION--version check failed t (eval 19) line 2.
I don't know why that's happening, but making it be seen would be an improvement.
diff -burN Devel-Cover-0.53.orig/lib/Devel/Cover.pm Devel-Cover-0.53/lib/Devel/Cover.pm
--- Devel-Cover-0.53.orig/lib/Devel/Cover.pm Sun Apr 17 17:44:09 2005
+++ Devel-Cover-0.53/lib/Devel/Cover.pm Fri Sep 2 19:21:04 2005
@@ -27,7 +27,14 @@
use Cwd "abs_path";
use File::Spec;
-BEGIN { eval "use Pod::Coverage 0.06" } # We'll use this if it is available.
+BEGIN {
+ # We'll use this if it is available.
+ eval "use Pod::Coverage 0.06";
+ # If there is any error other than a failure to locate, report it.
+ if ( $@ && $@ !~ m/Can't locate Pod\/Coverage.pm in \@INC/ ) {
+ die $@;
+ }
+}
# $SIG{__DIE__} = \&Carp::confess;