Issue #18109 has been reported by Chris Spence.

----------------------------------------
Bug #18109: Class namespace declaration appears to be dynamically scoped
https://projects.puppetlabs.com/issues/18109

Author: Chris Spence
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.7.19
Keywords: 
Branch: 


In the example below, the class declaration test generates an error

    class role::test {
      class { 'test': }
      #include test
    }
    Duplicate declaration: Class[Role::Test] is already declared; cannot 
redeclare at /etc/puppetlabs/puppet/modules/role/manifests/test.pp:2

as it appears to be attempting to redeclare itself due to dynamic namespacing 
in the class { 'test': } declaration.

the 'include test' line also doesn't do the 'right thing' because it declares 
the role::test class, however include ::test does the right thing 

The workaround is to declare class { '::test': } (or include ::test) , however 
I wouldn't expect class declaration lookup to be dynamic as a default - I can 
see that dynamic lookup would cause this to happen, but  wonder if this 
behaviour should be reviewed.


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