versions. I'm still relatively new to Puppet and haven't used custom
functions before, so wanted to run this by the list before filing a bug.
When calling custom functions from functions, arguments are being converted
to decimal arrays. That is, passing the argument 'bar' from a custom
function to another function results in
arg[0]: 98
arg[1]: 97
arg[2]: 114
Here's a full example in case I'm doing something wrong here.
Function 1:
module Puppet::Parser::Functions
newfunction(:foo) do |args|
puts 'args[0]:' + args[0].to_s
puts 'args.size:' + args.size.to_s
end
end
Function 2:
module Puppet::Parser::Functions
newfunction(:foo2) do |args|
Puppet::Parser::Functions.autoloader.loadall
function_foo('from_function')
end
end
A manifest:
foo('from_manifest')
foo2()
Puppet Agent run Result:
args[0]:from_manifest
args.size:1
args[0]:102
args.size:13
13 is the string length of 'from_function', and 102 is the decimal
representation of 'f'.
- Adam
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/mdCdbqkswjUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.