Issue #6863 has been updated by Ian Ward Comfort.

Keywords changed from parser to parser array function argument 

Yep, it's the parser that doesn't want an array as a function argument. I've 
just run into the same issue with one of my custom functions, and worked around 
it like this:

<pre>
$array = []
$var = myfunction("some other argument", $array)
</pre>

It would be a lot nicer to fix the parser, though.
----------------------------------------
Bug #6863: extlookup should handle arrays as default values
https://projects.puppetlabs.com/issues/6863

Author: Mark Heily
Status: Accepted
Priority: Normal
Assignee: 
Category: parser
Target version: 
Affected Puppet version: 2.6.3
Keywords: parser array function argument 
Branch: 


The extlookup() function is unable to return an array as a default value. For 
example, one would expect this to work:

    $x = extlookup($fqdn, [])

Unfortunately, this causes a syntax error:

    Error 400 on SERVER: Syntax error at '['; expected ']'

I consider this a bug because extlookup() can return an array; the 
documentation states "you can return arrays by just having multiple values in 
the csv after the initial variable name." If it can return an array, you ought 
to be able to provide an array as the default value.


-- 
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.

Reply via email to