Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2014-12-25 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls