Issue #8669 has been updated by Dustin Mitchell.

Oh - sorry about that.  I didn't find it documented anywhere else, and this 
seemed the only description of importing in a module context that I could find. 
 I suppose http://docs.puppetlabs.com/guides/modules.html#module-autoloading 
would be the best place for it, although 
http://docs.puppetlabs.com/references/stable/function.html#include might at 
least point to that location.

----------------------------------------
Bug #8669: document relative module includes
https://projects.puppetlabs.com/issues/8669

Author: Dustin Mitchell
Status: Needs Decision
Priority: Normal
Assignee: Nick Fagerlund
Category: 
Target version: 
Affected Puppet version: 2.6.4
Keywords: 
Branch: 
Affected URL: 


This page
 http://docs.puppetlabs.com/learning/modules1.html

should mention that 'include foo' in module bar will first look for foo::bar 
before looking for bar itself.  As an example, this will succeed:

<pre>
modules/puppet/manifests/master.pp:
 class puppet::master {
   include master
 }

modules/master/manifests/init.pp:
 class master {
   fail("hello")
 }

And

node "foo" {
  include puppet::master
}
</pre>

where you would think from reading the docs that <tt>include master</tt> would 
find <tt>modules/master/manifests/init.pp</tt>, it actually finds 
<tt>modules/puppet/manifests/master.pp</tt> and the <tt>puppet::master</tt> 
class.

This behavior is verified in 0.25.2 and (by jblaine) in 2.6.4.  It's not so bad 
if you know to look for it!


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