develooper Front page | perl.perl5.porters | Postings from November 2008

[perl #59280] PUSH on tied array gives incorrect context to method and can result in needless calls to FETCHSIZE

From:
Steve Peters via RT
Date:
November 25, 2008 02:57
Subject:
[perl #59280] PUSH on tied array gives incorrect context to method and can result in needless calls to FETCHSIZE
Message ID:
rt-3.6.HEAD-31684-1227595764-992.59280-15-0@perl.org
On Tue Sep 30 16:33:28 2008, lukeross@gmail.com wrote:
> Hi,
> 
> 2008/9/29 Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:
> > 2008/9/25 Luke Ross <lukeross@gmail.com>:
> >> OK sounds reasonable to not change the behaviour of the PUSH sub, but
> >> how about not call FETCHSIZE when the push is called in void context?
> >
> > That optimization seems reasonable to me. I also noticed that UNSHIFT
> > could be optimized the same way.
> 
> Here's an updated patch against 5.10 which applies the same to unshift().
> 
> Luke


Thanks!  Your patch was applied as change #34908.

Steve Peters



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