Issue #5489 has been updated by Ashley Penney.

Affected Puppet version changed from 2.6.4 to 3.0.0rc3

Just to confirm:  This still occurs in 3.x:

Scope(Class[main]): x
Error: Failed to parse template /home/apenney/tests/puppet/y.erb:
  Filepath: /home/apenney/tests/puppet/y.erb
  Line: 1
  Detail: wrong number of arguments (0 for 1)
 at /home/apenney/tests/puppet/y.pp:4 on node arya.untaken.net
Error: Failed to parse template /home/apenney/tests/puppet/y.erb:
  Filepath: /home/apenney/tests/puppet/y.erb
  Line: 1
  Detail: wrong number of arguments (0 for 1)
 at /home/apenney/tests/puppet/y.pp:4 on node arya.untaken.net
----------------------------------------
Bug #5489: template function should warn if any variables from the current 
scope are the same as any methods
https://projects.puppetlabs.com/issues/5489#change-67703

Author: Dan Bode
Status: Accepted
Priority: Normal
Assignee: 
Category: functions
Target version: 
Affected Puppet version: 3.0.0rc3
Keywords: 
Branch: 


I ran into the following:

<pre>
#y.pp
$y='x'
notice($y)
file { '/tmp/foo':
  content => template('/etc/puppet/templates/y.erb'),
}
</pre>

<pre>
#y.erb
<%= y %>
</pre>

I am lucky the function required an argument.

<pre>
puppet apply y.pp
notice: Scope(Class[main]): x
Failed to parse template /etc/puppet/templates/y.erb: wrong number of arguments 
(0 for 1) at /etc/puppet/manifests/y.pp:4 on node mypuppetmaster.localdomain
</pre>

This was still difficult to debug. In the case of a no argument function, it 
would have been even more difficult to figure out.

for extra credit, what does the y function in puppet do anyways?


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