On 27/06/17 17:44, Christopher Wood wrote:
A little oddity I stumbled across while getting things wrong about somebody's
pastebin entry in #puppet on freenode.
This thing:
class classname (
Regexp $param,
) {
notice('yes')
}
class { 'classname':
param => /^.$/,
}
Does this with puppet 4.10.2:
$ puppet apply /tmp/z.pp
Error: Evaluation Error: Error while evaluating a Resource Statement,
Class[Classname]: parameter 'param' expects a Regexp value, got String at
/tmp/z.pp:7:1 on node cwl.me.com
Am I even supposed to be able to pass a Regexp to a class?
Short answer: Not without turning on experimental feature using the
setting --rich_data. I noticed you filed a ticket for this and I
provided more information there
(https://tickets.puppetlabs.com/browse/PUP-7735)
- henrik
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
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/oivqap%244nb%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.