Hi,
I'm currently trying to write a Puppet 4, EPP, version of
https://forge.puppet.com/deanwilson/multitemplate but I'm having an
issue with the dispatch rules I'd like to use.
In order to support multiple template file names, and provide values
for the templates, I think I want something like this (but with a
better Pattern):
dispatch :template_data do
scope_param
repeated_param 'String', :templates
param 'Hash[Pattern[/^\w+$/], Any]', :parameters
end
But that's not allowed as repeated patterns have to be the last thing
(excluding blocks.) I know in modern rubies you can have a 'splat' in
the middle and unpack the first and last params so I was wondering if
it'd be considered for puppet function dispatch too.
I can currently get around this with a call like
multi_epp_template(['file', 'file2'], { }) but that extra bit of array
syntax feels unwieldy.
In general the puppet 4 function dispatch stuff has been quite nice to
work with, so congrats on that.
Dean
--
Dean Wilson
http://www.unixdaemon.net