Hello,

I have a variety of hashes that have similar content:

$h = {
    'foo1' => 'bar',
    [...]
    'foo99' => 'baz',
    'foo100' => 'h',
}

$g = {
    'foo1' => 'bar',
    [...]
    'foo99' => 'baz',
    'foo100' => 'g',
}

I'd like to have a function or similar mechanism:

$h = helper_module::get_hash_defaults()

but be able to override various keys/parameters in the get_hash_defaults 
function:

$h = helper_module::get_hash_defaults(
    'foo100' => 'h',
)

$h = helper_module::get_hash_defaults(
    'foo100' => 'g',
)

but functions only take parameters by position.

Does anyone have any clever hacks I could try to mimic passing arguments by 
name?

Thanks for any help!

-m

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e39f696b-a908-461b-a5fb-44a52a28e83bn%40googlegroups.com.

Reply via email to