Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Isn't Perl5 ready for C<my sub>?

by dave_the_m (Monsignor)
on Sep 07, 2005 at 16:00 UTC ( #489909=note: print w/replies, xml ) Need Help??


in reply to Isn't Perl5 ready for C<my sub>?

The perl5 parser has had a placeholder for lexical subs for quite a while:
$ perl -we 'my sub foo {}' "my sub" not yet implemented at -e line 1. $
and a pad can quite happily accomodate them.
The main things holding them up has been trying to agree their semantics, then someone - probably me - finding the time to implement them :-(.

Dave.

Replies are listed 'Best First'.
Re^2: Isn't Perl5 ready for C<my sub>?
by blazar (Canon) on Sep 08, 2005 at 14:17 UTC
    Let me guess... since in Perl5 an assignment to the declaration of a lexical variable can't contain the same lexical variable in the rhs (well, poor phrasing, but no doubt it's clear what I mean!) there's not yet full consensus on what should the name of such a sub refer to within its own body. Got it?
      well, that's one thing. Then there's things like: does the sub get re-created on each scope entry (so it captures external lexical vars anew) and does it affect method resolution?

      Dave.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2022-01-16 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (50 votes). Check out past polls.

    Notices?