On 23/08/17 03:28, John Baird wrote:
Henrik,

Thanks for the feedback.  My concern stems, really, from being able to use this with Puppet.  I would think that I should be able to specify a filename and/or filepath that contain a "." without having to escape those myself.  The backend should handle that, in my opinion.  You can image if a user/developer wanted to have a domain-oriented folder structure with multiple domains, how that could get extremely hard to read quickly... "/path/to/file/domain1\.example\.com" and then the variable would have to be unescaped for all other references to that variable.  That seems silly.  I appreciate your time on this, but I feel like there has to be a better solution, I just haven't found it yet.  I am still working on making this code work...

The escaping is not done with '\' - the dot should be quoted with single or double quotes. In your case "/path/to/file/domain1'.'example'.'com"

Since you will not ever be able to use file paths as keys that are handled by APL (the paths are not valid names in the language) you can simply write a small wrapper function that users call instead of lookup() to perform this kind of lookup - this function would quote the given path and then delegate to the existing lookup.

i.e. something like

$content = lookup_path_data("/path/to/file/domain1.example.com")

- henrik
--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/onjcfc%24vf7%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to