develooper Front page | perl.perl5.porters | Postings from August 2001

Backwards compatibility breakage in foreach?

Thread Next
From:
Michael G Schwern
Date:
August 21, 2001 10:55
Subject:
Backwards compatibility breakage in foreach?
Message ID:
20010821135549.K568@blackrider
    foreach my $thing (qw(foo bar)) { 
        $thing = 'something else';
    }

This innocent looking loop runs fine in 5.004_05 and 5.005_03.  Run it
in 5.6.1 or bleadperl and you get:

    Modification of a read-only value attempted

Smells like backwards compatibility breakage to me.


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>	     Kwalitee Is Job One
"Let's face it," said bearded Rusty Simmons, opening a can after the
race.  "This is a good excuse to drink some beer."  At 10:30 in the
morning?  "Well, it's past noon in Dublin," said teammate Mike
[Joseph] Schwern.  "It's our duty."
    -- "Sure, and It's a Great Day for Irish Runners" 
       Newsday, Sunday, March 20, 1988

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