diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-02-01 16:12:50 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-01 14:44:39 +0000 |
commit | 3db621fff0190e634928562c9f2fd308ab651d3c (patch) | |
tree | 483146c2f5268e75f8a42057eb89103fdfed5420 /pp_sys.c | |
parent | fe69a90c3f7231026ad863ff8acde1f0e0b750c3 (diff) | |
download | perl-3db621fff0190e634928562c9f2fd308ab651d3c.tar.gz |
make "lstat FH" croak
Message-ID: <20020201151250.A738@rafael>
p4raw-id: //depot/perl@14513
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -2726,12 +2726,10 @@ PP(pp_stat) if (PL_op->op_flags & OPf_REF) { gv = cGVOP_gv; if (PL_op->op_type == OP_LSTAT) { + if (gv != PL_defgv) + Perl_croak(aTHX_ "You can't use lstat() on a filehandle"); if (PL_laststype != OP_LSTAT) Perl_croak(aTHX_ "The stat preceding lstat() wasn't an lstat"); - if (ckWARN(WARN_IO) && gv != PL_defgv) - Perl_warner(aTHX_ WARN_IO, - "lstat() on filehandle %s", GvENAME(gv)); - /* Perl_my_lstat (-l) croak's on filehandle, why warn here? */ } do_fstat: |