develooper Front page | perl.perl5.porters | Postings from April 2007

Where does $1 get its READONLY flag?

Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
April 7, 2007 22:38
Subject:
Where does $1 get its READONLY flag?
Message ID:
51dd1af80704072237h75ada3d3s12e8ca2c83804328@mail.gmail.com
I'm trying to find out where $1 gets its READONLY flag to make C<$1 =
"ook"> work (see previous threads), but I'm not familiar enough with
the magic or perl's flow to know where the stack item sassign gets
comes from. So, uh, hints?:)

(gdb) break Perl_pp_sassign
Breakpoint 12 at 0x80f0169: file pp_hot.c, line 124.
(gdb) run -e 'print($1 = "ook")'
Starting program: /usr/local/bin/perl5.9.5 -e 'print($1 = "ook")'

Breakpoint 12, Perl_pp_sassign () at pp_hot.c:124
(gdb) n
(gdb) p SvFLAGS(right) & SVf_READONLY
$13 = 134217728

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