On Sat, Sep 25, 2010 at 2:45 PM, Nigel Kersten <ni...@explanatorygap.net> wrote: > What implications of introducing a new syntactical element are there?
Yet another inconsistency and confusion for newbies. With that said, I think the benefits _far_ outweigh the drawbacks. Especially since it brings consistency to the behavior of file() template() and source. > Where else could we use this? On import statements? Any function that needs to read data from the file system on the master. I'm looking at you, extlookup() ... Today I wrote a function called getconf() which is little more than Puppet::Parser::Functions.newfunction(:getconf, :type => :rvalue) do |args| Puppet.settings[args[0]] end The motivation was to store extlookup data inside of confdir which is usually under version control and at different file system paths for development, testing, and production. $confdir = getconf("confdir") $extlookup_datadir = "${confdir}/extdata" > import "foo.pp" already looks in the current working directory, but is > there any point trying to add this throughout the language so you can > do: > > # modules/foo/manifests/a/b/c/d/contrived.pp > import "~/clean.pp" > > and it resolves to modules/foo/manifests/clean.pp ? I think no matter what the path expansion logic should be generalized into some utility method so types, providers, functions, report processors, and whatever else we cook up can take advantage of this. A quick win could be to add an path_to() function to the language which should give us the desired behavior for free. import path_to("~/clean.pp") -- Jeff McCune http://www.puppetlabs.com/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.