Issue #7991 has been reported by Trevor Vaughan.
----------------------------------------
Bug #7991: Issue with using custom functions in templates.
https://projects.puppetlabs.com/issues/7991
Author: Trevor Vaughan
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version:
Keywords: custom function, template
Branch:
To use a custom function in a template, you must do something like the
following:
`$var = inline_template("<%= Puppet::Parser::Functions::function('myfunction');
'' %><%= scope.function_myfunction(options) %>")`
Furthermore, to make this work in any order, you must stick something like the
following in your code:
`if false { myfunction('blah') }`
However, if you do this *anywhere at all*, you can no longer do the following:
`$var = myfunction('foo')`
Why? I have no idea! But it certainly doesn't seem like it should work this way.
Seems to affect all Puppet versions that I've tried. <= 2.6.6
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.