Issue #5127 has been updated by James Turnbull.

Status changed from Accepted to Ready for Testing
Target version set to 2.6.x


----------------------------------------
Feature #5127: Array entries should be addressable by index in the DSL
https://projects.puppetlabs.com/issues/5127

Author: Nigel Kersten
Status: Ready for Testing
Priority: Normal
Assignee: Brice Figureau
Category: parser
Target version: 2.6.x
Affected Puppet version: 2.6.2
Keywords: 
Branch: http://github.com/masterzen/puppet/tree/tickets/2.6.x/5127


This is something people shouldn't have to use functions or string munging for.

Hashes work by key:

<pre>
$foo = { 0 => "zero", 1 => "one", 2 => "two" }
notice $foo[0]
</pre>
<pre>
nbk$ puppet -v /tmp/test.pp 
notice: Scope(Class[main]): zero
info: Applying configuration version '1288210234'
</pre>

Arrays do not, no matter how I quote:
<pre>
$foo = ["one", "two", "three"]
notice "$foo[1]"
notice $foo[1]
</pre>

<pre>
nbk$ puppet -v /tmp/test.pp 
notice: Scope(Class[main]): onetwothree[1]
can't convert String into Integer at /tmp/test.pp:3 on node 
kripke.puppetlabs.lan
</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