develooper Front page | perl.perl5.porters | Postings from July 2011

[perl #93652] PerlIO::via does not create a new dynamic scope for $1

From:
Father Chrysostomos via RT
Date:
July 3, 2011 14:00
Subject:
[perl #93652] PerlIO::via does not create a new dynamic scope for $1
Message ID:
rt-3.6.HEAD-16080-1309726850-1388.93652-15-0@perl.org
On Mon Jun 27 16:13:21 2011, perlbug@spamwagon.com wrote:
> When PerlIO::via runs the WRITE stack (or possibly any stack),
> it does not appear to create a new dynamic scope for each layer
> method called.  Modifying the global regular expression match
> variables like $1 in a lower IO layer can cause $1 to have an
> unexpected value in the IO layer above.

You are right in saying ‘possibly any stack’. This is the same as bug
#22369. (But I disagree with the assessment in that ticket that it is
just a matter of documenting it. This *is* a bug that needs to be fixed,
IMO, since it is so counter-intuitive.)




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