Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: closure clarity, please

by ikegami (Pope)
on Nov 24, 2009 at 20:52 UTC ( #809205=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Foo;
    
    ...
    sub get_x { die("uninitialized") if !defined($x); $x }
    
    1;
    
  2. or download this
    {
        my $x;
        sub set_x { validate($_[0]); $x = $_[0]; }
        sub get_x { die("uninitialized") if !defined($x); $x }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2015-07-30 07:41 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 (270 votes), past polls