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

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

by tye (Cardinal)
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 imbibing at the Monastery: (11)
As of 2014-09-30 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (381 votes), past polls