diff options
author | Tony Cook <tony@develop-help.com> | 2013-07-03 10:33:52 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-07-03 11:06:13 +1000 |
commit | 0caa00cc099de25f4797fc2b0f467bb22e5ef11c (patch) | |
tree | f652c7d07f3a8cae235292dcf2450f67ec192d69 /dist/base | |
parent | 2c9972cc1cf1af7d18bb193cc0f59b3989b4a40f (diff) | |
download | perl-0caa00cc099de25f4797fc2b0f467bb22e5ef11c.tar.gz |
Revert "[perl #118561] failures loading modules are ignored when sub-package exists"
This reverts commit c4f21d8bae2372c750ff63b7e5df47996baa1f39.
This broke tests in Moose.
Diffstat (limited to 'dist/base')
-rw-r--r-- | dist/base/lib/base.pm | 2 | ||||
-rw-r--r-- | dist/base/t/base.t | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm index 446ac16592..6b7d39ac8f 100644 --- a/dist/base/lib/base.pm +++ b/dist/base/lib/base.pm @@ -82,7 +82,7 @@ sub import { # Only ignore "Can't locate" errors from our eval require. # Other fatal errors (syntax etc) must be reported. die if $@ && $@ !~ /^Can't locate .*? at \(eval /; - unless (grep { !/::$/ } keys %{"$base\::"}) { + unless (%{"$base\::"}) { require Carp; local $" = " "; Carp::croak(<<ERROR); diff --git a/dist/base/t/base.t b/dist/base/t/base.t index 705ed8ff1a..6fb24ea308 100644 --- a/dist/base/t/base.t +++ b/dist/base/t/base.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 12; +use Test::More tests => 11; use_ok('base'); @@ -55,11 +55,6 @@ like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty\./, eval q{use base 'reallyReAlLyNotexists'}; like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty\./, ' still empty on 2nd load'); -eval 'sub reallyReAlLyNotexists::Sub::welp { }'; -eval q{use base 'reallyReAlLyNotexists'}; -like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty\./, - ' empty even with sub-package existing'); - { my $warning; local $SIG{__WARN__} = sub { $warning = shift }; |