develooper Front page | perl.perl5.porters | Postings from January 2001

Even more lvalue lunacy

Thread Next
Simon Cozens
January 28, 2001 18:30
Even more lvalue lunacy
Message ID:
Suppose we want to do C-style:

 % ./perl -le '$ = $baz'
Can't modify concatenation (.) or string in scalar assignment at -e line 1, at 
Execution of -e aborted due to compilation errors.

Yes, all very well, Perl, but "." may be overloaded for $foo and the
overloaded sub may be defined in the lvalue context.

I have a feeling that if we want to do lvalue subs *right*, then compile-time
modification checking has to go away.

(PS: Should one be able to overload -> ?)

I would imagine most of the readers of this group would support abortion
as long as fifty or sixty years after conception for certain individuals
    - Michael Stevens

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