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

[perl #77388] Stacked file tests with -T, -t and/or -B remove too much from the stack

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
January 20, 2012 14:13
Subject:
[perl #77388] Stacked file tests with -T, -t and/or -B remove too much from the stack
Message ID:
rt-3.6.HEAD-14510-1327097612-829.77388-15-0@perl.org
On Sat Jan 14 00:58:12 2012, sprout wrote:
> On Thu Jan 12 13:30:10 2012, sprout wrote:
> > Except that can’t really work either, because what would -r -t do? 
> > After all, -t doesn’t *set* the stat buffer, either.
> > 
> > I propose we make stacked -t an error in 5.16.  It has never worked,
> > it’s not clear how it should work, and if we try to make it do something
> > illogical we’ll be stuck ‘supporting’ that behaviour.
> > 
> 
> But maybe later we could make -t work with _.

I was about to make stacked -t a compile time error, when I realised
that it would break objects with -X overloading, which currently *do*
work with stacked -t.

So I realised the real problem: When overloading is not present, the -r
in -r -w foo uses _.  When overloading is present, -w arranges for -r to
receive the same argument.

So it only makes sense to me to use the latter mechanism for stacked -t.

Using the former still makes sense for other filetest operators, because
-r -w foo should only do one stat, not two.

(Is anybody reading this?)

-- 

Father Chrysostomos


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

Thread Previous | Thread Next


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