Hi all,
I've started to make some future parser versions of the most useful Tiny 
Puppet defines:
https://github.com/example42/puppet-tp/commit/78222a8e12542d0203b2bc600b7984fbf555a488
the main advantages I've seen, for this use case, is the neater and more 
concise parameters validation, and, for the tp::install4 define 
(https://github.com/example42/puppet-tp/blob/master/manifests/install4.pp) 
, the ability to cope with arrays of packages and services.

Another small change is the usage of the + operator on hashes instead of 
stdlib's merge().
There's probably more that can be done on them (any input or suggestions 
 is welcomed) , but in particular I have a point I'd like to fix.

When Parameters are undef by default I didn't find anything better than 
enforcing an "Any" type, which actually does not validate anything:

define tp::conf4 ( String $ensure = present, Any $source = undef, Any 
$template = undef, Any $epp = undef, Any $content = undef,
is there a concise way (without other verbose conditionals in the code) to 
validate a parameter type IF that parameter is passed when is undef by 
default? 

Any help appreciated,
al

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/66b016b6-0e1a-4623-9c1b-ab61ed179dcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to