|
It needs to be backwards compatible. This means we cannot take a relative name to mean something other than what it used to mean. The functions makes a URI out of the given "path" and interprets "puppet:", then it either accepts an absolute file name or a relative. The relative must start with the a path segment that is the module name.
For the references that are resolved via functions (for example 'template' and 'epp') we could accept a filename $f = "template.erb" (no path separators) to be resolved to the same as if $f = "$module_name/template.erb".
For source it is more complicated as that happens much later when there is no $module_name variable to use.
I could imagine using different URI schemes, a "self:template.erb" could resolve to "this module", a "module::foo::template.erb" to a template in module foo, etc.
|