This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #118561] note that the check is fragile and refer to parent.pm
authorTony Cook <tony@develop-help.com>
Wed, 3 Jul 2013 00:46:59 +0000 (10:46 +1000)
committerTony Cook <tony@develop-help.com>
Wed, 3 Jul 2013 01:06:19 +0000 (11:06 +1000)
dist/base/lib/base.pm

index 6b7d39a..4c4b1d2 100644 (file)
@@ -81,6 +81,12 @@ sub import {
                 eval "require $base";
                 # Only ignore "Can't locate" errors from our eval require.
                 # Other fatal errors (syntax etc) must be reported.
+                #
+                # changing the check here is fragile - if the check
+                # here isn't catching every error you want, you should
+                # probably be using parent.pm, which doesn't try to
+                # guess whether require is needed or failed,
+                # see [perl #118561]
                 die if $@ && $@ !~ /^Can't locate .*? at \(eval /;
                 unless (%{"$base\::"}) {
                     require Carp;