develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #8244] *FILE{IO} does not behave like *FILE for stat() and -X() operators

Thread Previous
From:
Father Chrysostomos via RT
Date:
January 13, 2012 23:18
Subject:
[perl #8244] *FILE{IO} does not behave like *FILE for stat() and -X() operators
Message ID:
rt-3.6.HEAD-14510-1326525489-1271.8244-15-0@perl.org
On Thu Aug 10 02:48:16 2006, rgarciasuarez@mandriva.com wrote:
> Andrew Dougherty wrote:
> > The following test script (stripped down from t/op/stat.t)
> illustrates the
> > problem.  It currently core dumps at the XXX line while trying to
> warn
> > "lstat() on filehandle %s", GvENAME(gv), and dumps core since gv is
> NULL.
> > I haven't dug deeply enough to decide whether to just beef up the
> warning
> > message (and the corresponding perldiag entry) or whether there's
> some way
> > to make some more useful information available.
> 
> Not seeing an obvious way to get more useful information, I've for now
> plugged the hole by change #28690:
> 
> -                       "lstat() on filehandle %s", GvENAME(gv));
> +                       "lstat() on filehandle %s", gv ? GvENAME(gv) :
> "");
> 

That leaves a double space before ‘at’:

lstat() on filehandle  at -e line 1.

I’ve just fixed that in commit 93fad9301a05.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=8244

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About