summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-06-29 17:23:41 +0100
committerNicholas Clark <nick@ccl4.org>2010-06-29 17:26:06 +0100
commit686c4ca09cf9d6ae455bf0a013551e92f00e34fe (patch)
treef819fe24b51327aea2e09d7501651fe16e7948bb /pp_ctl.c
parentec72681b3d7714d33bccdc5be6f31b5db25f9c90 (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index d71853164a..8134187dd1 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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?)" : "")
));