summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2000-04-21 04:43:46 -0600
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-04 19:02:08 +0000
commit9d8379451873878ac81deb50e7500757d4f8bc16 (patch)
treeb89cf1188e1fabe36fdb31470cad1ef3ef35bfc8 /pp_sys.c
parentecde9bf0b063dc94d08b46396600e0545440c837 (diff)
downloadperl-9d8379451873878ac81deb50e7500757d4f8bc16.tar.gz
Warn under -w if lstat(FH) is attempted.
Subject: [ID 20000421.003] perlfunc says you can lstat a file handle but you cannot Message-Id: <200004211643.e3LGhkX24720@xerxes.courtesan.com> p4raw-id: //depot/perl@6524
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 9a264c8c44..b4cbb55254 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2497,6 +2497,9 @@ PP(pp_stat)
if (PL_op->op_flags & OPf_REF) {
tmpgv = cGVOP_gv;
+ if (PL_op->op_type == OP_LSTAT && ckWARN(WARN_IO))
+ Perl_warner(aTHX_ WARN_IO,
+ "lstat() on filehandle %s", GvENAME(tmpgv));
do_fstat:
if (tmpgv != PL_defgv) {
PL_laststype = OP_STAT;