summaryrefslogtreecommitdiff
path: root/cpan/parent
diff options
context:
space:
mode:
authorPaul Johnson <paul@pjcj.net>2012-09-26 02:44:45 +0200
committerFather Chrysostomos <sprout@cpan.org>2012-09-30 00:01:27 -0700
commitf7ee53b55241648302d3da2fac688b5a0d595fd7 (patch)
treecc6802e24d29fd881f10eb14fcc1d9c45011d3f3 /cpan/parent
parent7ae5d31c28bff87535cb83fdb5c83abac5c5e3ad (diff)
downloadperl-f7ee53b55241648302d3da2fac688b5a0d595fd7.tar.gz
Suggest cause of error requiring .pm file.
Following on from a recent thread I've put together a patch to expand the error message when a module can't be loaded. With this patch, instead of: Can't locate Stuff/Of/Dreams.pm in @INC (@INC contains: ...) You get: Can't locate Stuff/Of/Dreams.pm in @INC (you may need to install the Stuff::Of::Dreams module) (@INC contains: ...) [The committer tweaked the error message, based on a suggestion by Tony Cook. See <https://rt.perl.org/rt3/Ticket/Display.html?id=115048#txn-1157750>.]
Diffstat (limited to 'cpan/parent')
-rw-r--r--cpan/parent/t/parent.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpan/parent/t/parent.t b/cpan/parent/t/parent.t
index 401fe39d5d..6ee4494e8a 100644
--- a/cpan/parent/t/parent.t
+++ b/cpan/parent/t/parent.t
@@ -58,10 +58,10 @@ is( $Eval2::VERSION, '1.02' );
eval q{use parent 'reallyReAlLyNotexists'};
-like( $@, q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(\@INC contains:/}, 'baseclass that does not exist');
+like( $@, q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(you may need to install the reallyReAlLyNotexists module\) \(\@INC contains:/}, 'baseclass that does not exist');
eval q{use parent 'reallyReAlLyNotexists'};
-like( $@, q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(\@INC contains:/}, ' still failing on 2nd load');
+like( $@, q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(you may need to install the reallyReAlLyNotexists module\) \(\@INC contains:/}, ' still failing on 2nd load');
{
my $warning;
local $SIG{__WARN__} = sub { $warning = shift };