Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: what would you like to see in perl5.12?

by holli (Monsignor)
on Aug 20, 2007 at 12:34 UTC ( #633789=note: print w/ replies, xml ) Need Help??

in reply to what would you like to see in perl5.12?

"Real" and fast lvalue-subs that are able to "see" the right value (for checking), not the crippled implementation as today.

Yes, this is for accessors like $object->foo = "bar";, I grew up with VB and $object->foo("bar";) simply doesn't feel right.

I know it can be done by returning tied hashes, but that is fat, slow and ugly and needs extra work. Thinking about it, why not a new keyword:

package blablabla; sub new { #... } property get foo { return $self->{_foo}; } property set foo { my $foo = shift; $self->{_foo} = $foo; }

holli, /regexed monk/

Comment on Re: what would you like to see in perl5.12?
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://633789]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2015-10-04 12:20 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (102 votes), past polls