Issue #10848 has been updated by Nigel Kersten.

Status changed from Accepted to Needs Decision
Assignee set to Daniel Pittman
Keywords set to devtriage

I suspect that our changes in behavior for Telly where we're removing dynamic 
variable lookup may affect this and make this actually work.

I need developer input on that one though.
----------------------------------------
Bug #10848: When is "class { foo: }" not equivalent to "include foo"?
https://projects.puppetlabs.com/issues/10848

Author: Lars Kellogg-Stedman
Status: Needs Decision
Priority: Normal
Assignee: Daniel Pittman
Category: plumbing
Target version: 
Affected Puppet version: 2.6.0
Keywords: devtriage
Branch: 


If I have:

    modules/
      autofs/
        manifests/
          init.pp
      virtcluster/
        manifests/
          autofs.pp

And in autofs/manifests/init.pp I have:

    class autofs {
    }

And in virtcluster/manifests/autofs.pp I have:

    class virtcluster::autofs {
      include autofs
    }

This works as intended.  However, if I replace `include` with a new-style class 
directive:

    class virtcluster::autofs {
      class { autofs: }
    }

This fails with a "duplicate definition" error:

    Duplicate definition: Class[Virtcluster::Autofs] is already defined; cannot 
redefined at ...

Is this expected?  I thought that `class { foo: }` was supposed to be 
equivalent to `include foo`, but obviously the semantics are different.

I'm using 2.7.6 right now, but I've seen this with earlier versions as well.



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