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

[PATCH] GLOB to LVALUE assignment fix

Thread Next
Tassilo von Parseval
February 14, 2004 03:05
[PATCH] GLOB to LVALUE assignment fix
Message ID:

attached you will find the revises patch against @22302 that extends an
LV to hold a complete GV. Differences to the patch draft include a
clean-up in dump.c and thus avoiding duplicate code.

I checked those places that do an explicit comparison between SvTYPEs
and changed them accordingly. With the previous patch, this

    my $v = *GLOB; --$v;

would no longer produce the expected error 'Modification of a read-only
value attempted'. Now the error is back (note that we don't yet have a
test for that).

I added four tests to op/gv.t simply because I didn't find a better
place for them. The generic case

    sub f { $_[0] = *GLOB }

is tested, as is the case for a tied array-element (although this is
superseded by the above):

    $tied[0] = *GLOB;

I didn't explicitely add a test for a tied hash-element. 

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