Hi Craig,

That makes sense. In fact, now I remember this is not the first time it 
bites me.
I'll stick a post-it in my forehead.

Thank you!

On Tuesday, August 19, 2014 12:55:53 PM UTC+2, Craig Dunn wrote:
>
>
>
>
> On Tue, Aug 19, 2014 at 12:33 PM, Marc <marc.vi...@gmail.com <javascript:>
> > wrote:
>
> Hi all,
>>
>> The code snippet below is an isolation of the problem I am facing.
>> I don't understand why this produces a duplicate declaration.
>> Can anyone give an explanation?
>>
>> *$ cat test.pp *
>> *class foo { contain foo::bar }*
>> *class foo::bar { class { 'bar': } }*
>> *class bar { notify { 'hello': } }*
>> *include foo*
>>
>>
> Within class foo::bar "bar" is being found in local scope (eg: it's 
> declaring itself).  Thats why fully qualified is always a good way to go to 
> be explicit about these things.  You need to explicitly require ::bar, not 
> bar...
>
> class foo::bar { class { '::bar': } }
>
> Craig
>  
>
> -- 
> *Enviatics *| Automation and configuration management
> http://www.enviatics.com | @Enviatics
> Puppet Training http://www.enviatics.com/training/
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9b641d21-c2ca-4115-a3bd-e630927359a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to