In perl.git, the branch davem/require_fixups2 has been created
<http://perl5.git.perl.org/perl.git/commitdiff/0c25175c3e81ecb7a371d88eafea390328681258?hp=0000000000000000000000000000000000000000>
at 0c25175c3e81ecb7a371d88eafea390328681258 (commit)
- Log -----------------------------------------------------------------
commit 0c25175c3e81ecb7a371d88eafea390328681258
Author: David Mitchell <[email protected]>
Date: Sun Apr 16 09:50:04 2017 +0100
emit require module name err hint only when valid
RT #131098
The helpful "you may need to install" hint which 'require' sometimes
includes in its error message these days (split across multiple lines for
clarity):
$ perl -e'require Foo::Bar'
Can't locate Foo/Bar.pm in @INC
(you may need to install the Foo::Bar module)
(@INC contains: ... ) at ...
is a bit over-enthusiastic when the pathname hasn't actually been derived
from a module name:
$ perl -e'require "Foo.+/%#Bar.pm"'
Can't locate Foo.+%#Bar.pm in @INC
(you may need to install the Foo.+::%#Bar module)
(@INC contains: ... ) at ...
This commit changes things so that the hint message is only emitted if the
reverse-mapped module name is legal as a bareword:
$ perl -e'require "Foo.+/%#Bar.pm"'
Can't locate Foo.+%#Bar.pm in @INC
(@INC contains: ... ) at ...
M pp_ctl.c
M t/op/require_errors.t
commit 5f30521f5d81ad5f65107e9d98f7b9ee9a64f2e5
Author: David Mitchell <[email protected]>
Date: Thu Apr 13 12:23:59 2017 +0100
require die msg: only mention @INC if used
RT #131098
5.8.0 introduced a change which as an inadvertent side-effect caused
this @INC-related require croak message:
Can't locate foo in @INC (@INC contains: ...) at ...
to be emitted even when foo is a non-searchable pathname (like /foo or
./foo) and @INC isn't used.
This commit reverts the error message in these cases to be the simple
Can't locate foo at ...
M pp_ctl.c
M t/op/require_errors.t
commit 2d8b2588ec62abbaa97b4bd3010ec0d5ab723ca0
Author: David Mitchell <[email protected]>
Date: Thu Apr 13 11:53:35 2017 +0100
S_require_file() : simplify an else if block
change
if (...) {
...
}
else {
if (...) {
...
}
}
to
if (...) {
...
}
else if (...) {
...
}
Should make no functional difference
M pp_ctl.c
commit 5d8cdcc92f9fff3abee727d9f26df50d44002814
Author: David Mitchell <[email protected]>
Date: Thu Apr 13 11:50:39 2017 +0100
better comment require() source.
Add code more comments to S_require_file() and its helpder functions to
better understand what's going on.
M pp_ctl.c
-----------------------------------------------------------------------
--
Perl5 Master Repository