summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-12-29 17:11:24 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-12-29 17:11:24 -0800
commitd955f84cfebcbed74088977f0bc7b1162c00a426 (patch)
tree66f694201d25d43b837ac7c59a660d28ea074569 /util.c
parent91fc0422e3a3e3aa6b0c35bb1d4d18d03fd35f30 (diff)
downloadperl-d955f84cfebcbed74088977f0bc7b1162c00a426.tar.gz
Improve rcatline bad fh warnings
This is not helpful: append I/O operator() on closed filehandle STDIN at - line 3. append I/O operator() on closed filehandle STDIN at - line 4. (Are you trying to call append I/O operator() on dirhandle STDIN?) That .=<> compiles to a separate op from <> is an implementation detail, so show ‘readline()’ as we do with <>.
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 55fc941415..596955b059 100644
--- a/util.c
+++ b/util.c
@@ -3403,7 +3403,8 @@ Perl_report_evil_fh(pTHX_ const GV *gv)
(const char *)(OP_IS_FILETEST(op) ? "" : "()");
const char * const func =
(const char *)
- (op == OP_READLINE ? "readline" : /* "<HANDLE>" not nice */
+ (op == OP_READLINE || op == OP_RCATLINE
+ ? "readline" : /* "<HANDLE>" not nice */
op == OP_LEAVEWRITE ? "write" : /* "write exit" not nice */
PL_op_desc[op]);
const char * const type =