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

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

by EvanCarroll (Chaplain)
on Aug 19, 2007 at 20:05 UTC ( #633656=note: print w/ replies, xml ) Need Help??


in reply to Re^2: what would you like to see in perl5.12?
in thread what would you like to see in perl5.12?

Bump the Moose suggestion and you can get close to that functionality now...

use Moose; has 'string' => ( isa => 'Str', is => 'rw' ); has 'times' => ( isa => 'Int', is => 'rw' ); sub foo { my $self = shift; my ( $string, $times ) = ( $self->string, $self->times ); }


Evan Carroll
www.EvanCarroll.com


Comment on Re^3: what would you like to see in perl5.12?
Download Code
Replies are listed 'Best First'.
Re^4: what would you like to see in perl5.12?
by moritz (Cardinal) on Aug 20, 2007 at 09:35 UTC
    Would that work with sub signatures (not methods), and does it allow for the same kind of optimization that is possible if the compiler knows about the types?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2015-07-29 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls