Not sure if that was the original behavior back in 1999 when they were first introduced but newer versions certainly disagree with you:
...You can retrieve it with $foo->get_set($bad_key)my %foo; get_set( 'foo' ) = 42; print get_set( 'foo' ); sub get_set :lvalue { my $key = shift; print "key is $key\n"; my $junk; $key eq 'foo' ? $foo{$key} : $junk; } __END__ key is foo key is foo 42
Where $bad_key is any and all bad keys. This is why one of the desired features would be to determine if it was in assignment or not.
Cheers - L~R
In reply to Re^2: Experimenting with Lvalue Subs
by Limbic~Region
in thread Experimenting with Lvalue Subs
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |