On Wed, Aug 3, 2011 at 9:20 AM, jcbollinger <john.bollin...@stjude.org>wrote:

>
> On Aug 2, 5:16 pm, Aaron Grewell <aaron.grew...@gmail.com> wrote:
> > I think you'll need to use both an include and a require.  The include
> makes
> > the class(es) in the file available, the require creates the actual
> > dependency.
>
> Yes, if the class in question is not otherwise 'include'd then it
> needs to be.  You must have an 'include' of it in scope everywhere you
> reference it.  Provided that it is not parameterized, it is safe to
> 'include' the class anywhere and everywhere that you reference it,
> though you may be able to reduce the number includes with some thought
> and planning.
>
> Be careful however: it is not quite right to say "include makes the
> class(es) in the file available."  That's what 'import' does, and it
> looks like you have already structured things so that you don't need
> explicit imports (good form, that).
>
> 'Include', on the other hand, specifies that the class's resources
> should be included in the current node's catalog.  To draw an
> (imperfect) analogy with C, 'import foo' is like #including a header
> file, whereas 'include foo' is more like calling a function.
>
>
>
This may bite me in the ass one day, but since I've been using extlookup and
accessing module variables INSIDE the module, I haven't had a single problem
with variable scope. It's become a non issue. My 2c worth.

Doug.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to