Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Real life uses for closures.

by ikegami (Pope)
on Feb 14, 2013 at 08:09 UTC ( #1018698=note: print w/ replies, xml ) Need Help??

in reply to Real life uses for closures.

Technically, f is a closure which captures $constant:

package Module; my $constant = 'foo'; sub f { ... $constant ... } 1;

Given your mention of state, this is probably not quite what you had in mind when you mentioned "simple C-style 'static' storage".

Comment on Re: Real life uses for closures.
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2016-02-07 09:58 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (250 votes), past polls