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

[PATCH] Double magic with '\&$x'

Thread Next
Vincent Pit
April 1, 2008 01:48
[PATCH] Double magic with '\&$x'
Message ID:
'\&$x' triggers double get magic when $x is just a scalar because of :
- the SvGETMAGIC in sv_2cv ;
- the SvPV_const in gv_fetchsv.
This patch moves the SvGETMAGIC into the two branches where gv_fetchsv
isn't called. This fixes the problem. Tested ok against 33623.

Actually, get magic also fires when it's not possible to create a sub of
name $x, because we call SvPV when building the croak message. This isn't
fixed by this patch. More generally, I'm wondering if magic actually has
to be triggered when assembling error messages.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About