diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-06-29 17:23:41 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-06-29 17:26:06 +0100 |
commit | 686c4ca09cf9d6ae455bf0a013551e92f00e34fe (patch) | |
tree | f819fe24b51327aea2e09d7501651fe16e7948bb /pp_ctl.c | |
parent | ec72681b3d7714d33bccdc5be6f31b5db25f9c90 (diff) | |
download | perl-686c4ca09cf9d6ae455bf0a013551e92f00e34fe.tar.gz |
Reinstate require error messages for .h and .ph
These had been present since 5.000, but were inadvertently removed by the
refactoring b8f04b1b779ce1df.
Yes, files matching /.*.h\z/ get two pieces of advice in the error message, but
this was the exact behaviour pre-b8f04b1b779ce1df.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3647,9 +3647,9 @@ PP(pp_require) SV * const msg = sv_2mortal(Perl_newSVpvf(aTHX_ "%s in @INC%s%s (@INC contains:", msgstr, - (instr(msgstr, ".h ") - ? " (change .h to .ph maybe?)" : ""), - (instr(msgstr, ".ph ") + (memEQ(name + len - 2, ".h", 3) + ? " (change .h to .ph maybe?) (did you run h2ph?)" : ""), + (memEQ(name + len - 3, ".ph", 4) ? " (did you run h2ph?)" : "") )); |