diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 2000-04-21 04:43:46 -0600 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-04 19:02:08 +0000 |
commit | 9d8379451873878ac81deb50e7500757d4f8bc16 (patch) | |
tree | b89cf1188e1fabe36fdb31470cad1ef3ef35bfc8 /pp_sys.c | |
parent | ecde9bf0b063dc94d08b46396600e0545440c837 (diff) | |
download | perl-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |