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