[Puppet Users] how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread midair77
Dear all, I have a parameterized class and one of the args is a hash or an array and I would like to check if they are empty or not? I tried with class test($hash, $array){ if $hash.empty? == true { } if $array.empty? == true { } } but when I just puppet parser validate init.pp I would g

Re: [Puppet Users] how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread Jacob Helwig
On Thu, 13 Oct 2011 10:01:49 -0700, midair77 wrote: > > Dear all, > > I have a parameterized class and one of the args is a hash or an array > and I would like to check if they are empty or not? > > I tried with > > class test($hash, $array){ >if $hash.empty? == true > { > } > if $array.e