Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Default subroutine parameters

by particle (Vicar)
on Apr 22, 2002 at 17:08 UTC ( [id://161107]=note: print w/replies, xml ) Need Help??


in reply to Default subroutine parameters

my preferred method is my $foo = shift // 'default';

alas, this method won't be available until perl 6 :(

see Exegesis 3 for more details (there's a summary on page 7.)

~Particle ;Þ

Replies are listed 'Best First'.
Re: Re: Default subroutine parameters
by BrentDax (Hermit) on Apr 22, 2002 at 21:03 UTC
    I submitted a patch last night to p5p that implements //, but it's too late to make it into 5.8. However, everyone thinks it's really cool, so there's a very good chance it'll be in 5.10. (One person suggested that we fork off 5.9 right now so the patch would apply, but everyone else (including me) thinks that it'd be more trouble than it's worth to keep it in sync with the 5.8 release candidates, which should start coming out Real Soon Now.)

    Needless to say, I'm happy--it's the first time I've ever patched the core and they're already excited. :^) I thought I'd get a few "oh, that's cool"s, some style critiques, and enough experience to confidently patch the core--not the first feature for the next version of the language.

    =cut
    --Brent Dax
    There is no sig.

      congrats, BrentDax. that is *very* cool.

      ~Particle ;Þ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-28 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found