Issue #7801 has been updated by Chris Price.

Status changed from In Topic Branch Pending Review to Merged - Pending Release
Target version changed from 2.7.x to Telly


----------------------------------------
Bug #7801: include function should accept an array
https://projects.puppetlabs.com/issues/7801#change-59732

Author: R.I. Pienaar
Status: Merged - Pending Release
Priority: Normal
Assignee: 
Category: functions
Target version: Telly
Affected Puppet version: 
Keywords: 
Branch: 
https://github.com/eshamow/puppet/tree/tickets/master/7801_include_should_accept_arrays


The include function should accept an array:

<pre>
$c = ["one", "two"]
include($c)
</pre>

This produces:

<pre>
undefined method `downcase' for ["one", "two"]:Array at /home/rip/test.pp:9 on 
node..
</pre>

The use case is that you might get your classes list from some external source, 
like a parser function.

Also and I think this might well be a seperate issue, the parser should allow 
this:

<pre>
include(["one", "two"])
</pre>

this currently produces:

<pre>
Could not parse for environment production: Syntax error at '['; expected ']' 
at /home/rip/test.pp:8 on node
</pre>


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