You said it yourself "the obvious parsing order caveats". Afaict, the
problem is that the resource has not yet been evaluated in the cases
where it did not work for you.
if you do something like
define foo { something { title: x => 1} }
foo { bar: }
notice Something['title']['x']
That fails because the evaluation of foo is lazy. When it is evaluated
it enqueues the evaluation of the 'something' and returns. Then an
attempt is made to access 'Something[title]' which will fail as it is
not yet evaluated. If you stick the second in a define, it will work as
it will be enqueued after what was enqueued in 'foo'.
e.g.
define foo { something { title: x => 1} }
define helper { notice Something['title']['x'] }
foo {bar: }
helper { yay: }
More about "the order of evaluation" can be read here:
http://puppet-on-the-edge.blogspot.se/2014/04/getting-your-puppet-ducks-in-row.html
- henrik
> ---
> R.I.Pienaar
>
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/