Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: how to declare a local *subname=sub{}?

by LanX (Saint)
on Oct 30, 2016 at 23:12 UTC ( [id://1174976]=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to declare a local *subname=sub{}?
in thread how to declare a local *subname=sub{}?

2) already answered, sub declarations are done at compile time, any local commands prior in text have no effect, they are run time, ie happen later.

Additionally you are explicitly setting the content of *bsub whenever you call the internal function.

update

Please read perlsub#Temporary-Values-via-local() and following

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re^3: how to declare a local *subname=sub{}?

Replies are listed 'Best First'.
Re^4: how to declare a local *subname=sub{}?
by perl-diddler (Chaplain) on Oct 31, 2016 at 12:00 UTC
    What was already answered? ... um... since the issues w/"bsub" were only a curiosity that grew out of implementing a test case for the "asub" case, let's just ignore the 'bsub' case declared within a sub. That seems to have generated way too much confusion for what was a "side", curiosity...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found