Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: 'state' variables and unit testing (Devel::Init)

by tye (Sage)
on Feb 01, 2014 at 22:36 UTC ( #1073004=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package MyConfig;
    ...
    ...
        our %HostConfig;
        return $HostConfig{$key} //= _getConfigForHost( $Host, $key );
    }
    
  2. or download this
    sub getConfig {
        my( $key, $host ) = @_;
    ...
        our %HostConfig;
        return $HostConfig{$key,$host} //= _getConfigForHost( $host, $key 
    +);
    }
    
  3. or download this
    $MyConfig::Host = $test_host;
    
  4. or download this
    for my $host ( ... ) {
        $MyConfig::Host = $host;
        %MyConfig::HostConfig = ();
        ...
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2016-08-25 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (352 votes). Check out past polls.