Issue #18024 has been reported by Yuri Arabadji.

----------------------------------------
Feature #18024: Make a shorthand alias for scope.lookupvar()
https://projects.puppetlabs.com/issues/18024

Author: Yuri Arabadji
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Tired of writing scope.lookupvar() in my templates. Gepetto doesn't have 
working auto-completion, sadly, so I have to ask here for a solution. 
That function is the most used in templates, assuming you've got hierarchy of 
defines/classes and there's an "intermediary" class between the defined 
resource and template. 
<pre>
class a {
  $thevar = 123
  whatever { 'yy': tmpl => 'xx'}
}

define whatever($tmpl) {
  file { /xxx:
   content => template($tmpl)
  }
}

xx.erb:

<%= scope.lookupvar('a::thevar') %>
</pre>

Maybe you could make a short alias for it, for ex.: "sl" or "slv".

Thanks.


-- 
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 puppet-bugs@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to