Issue #22219 has been reported by Dirk Elmendorf.

----------------------------------------
Bug #22219: Class Scope Gotcha
https://projects.puppetlabs.com/issues/22219

* Author: Dirk Elmendorf
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: parser
* Target version: 
* Affected Puppet version: 3.2.4
* Keywords: 
* Branch: 
----------------------------------------
Summary:  When you include a class inside a class and they have similar names 
then the new class does not get included.

Steps to Reproduce:
<pre>
class zamboni {
 notice("Class zamboni included")
}
class role::zamboni {
 notice("Class role::zamboni included")
 include zamboni
}

class role::server {
 notice("Class role::server included")
 include role::zamboni
}
</pre>
Expected Results:

Should include role::server,role::zamboni,:zamboni


Actual Results:
role::server and role::zamboni are included.  role::zamboni believes that the 
include zamboni is referring to itself so it does not include the class 
zamboni.  It still seems like there should be a warning since it doesn't really 
make sense that I would include a class in itself.

Workaround:

If I include ::zamboni in role::zamboni it doesn't get confused. 

Notes: I used zamboni to make it clear what is going on. I discovered the issue 
when I was working with the role::database::mysql & mysql

The mysql module is from the Puppet forge.




-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to