On Monday, June 4, 2018 at 1:06:52 PM UTC-5, Ramin K wrote:
>
> On 6/4/18 8:25 AM, Peter Berghold wrote: 
> > I was looking at someone else's code one day last week and saw a pattern 
> > I've not seen before. Maybe that's what I get for developing Puppet code 
> > in a vacuum. :-) 
> > 
> > class someclass ( 
> >      $parm1 = $::someclass::params::parm1, 
> >      $parm2 = $::someclass::params::parm2       # so far I get it. 
> > ) inherits someclass::params {             # ok, I get it 
> > 
> >       class{'someclass::package': }        # OK 
> >       -> class('someclass::configure':}    # right... 
> >       -> Class{'someclass':}                    #  HUH?  What does that 
> do? 
> > } 
> > 
> > Is that last step necessary and why? 
>
>
> The last step was fairly common in Puppet 2.7 code before Anchors.



Are you sure about that, Ramin?  I've been around Puppet since well before 
v2.7, and to the best of my knowledge, Class{'someclass':} (with capital 
'C') is and always has been syntactically invalid.  I'm prepared to learn 
something new today, but you'll need to point me to some docs to support 
your assertion.

Myself, I'm inclined to guess that it's a simple typo, that an ordinary 
resource-style class declaration (with lowercase 'c') is what was intended.

 

> [...]
>
>  

> By adding that -> Class{'someclass':} to the end you create a chain that 
> requires all classes to completed before 'someclass' is completed.
>


I don't think it's the chain operators that have Salty confused.  He says 
he's ok with a previous line that also uses one.  I'd be confused, too, if 
someone demonstrated that example code to compile successfully.


John

-- 
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/2afa8ebb-0357-47a7-9256-1478b65c5e35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to