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

Re: Interesting self contained task

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
February 23, 2008 00:04
Subject:
Re: Interesting self contained task
Message ID:
20080223080413.GN38653@plum.flirble.org
On Wed, Feb 20, 2008 at 09:38:01AM +0000, Nicholas Clark wrote:

> Um, oops. I found a rather simpler way to do it:

> Whilst we could change that test, it makes me wonder why we shouldn't have
> bless constant folded, *if* the constant it will be blessing has a reference
> count of 1. With that change, all existing code, albeit strange code, would
> still work.
> 
> (This must still fail:
> 
> $ perl -le 'bless \undef'
> Modification of a read-only value attempted at -e line 1.
> 
> )

Which, of course, is an alternative "interesting self contained task"

As is, I think, optimising constant pack unless the pattern contains 'p' or 'P'
and (possibly) optimising unpack, but only in scalar context. (Not sure how to
do that one)

Nicholas Clark

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