"defined($classname)" will return true if puppet code that describes
the named class can be found, whether or not the class has been
included.  On the other hand, "defined(File[$filename])" will only
return true if the code describing the file has been evaluated and the
file "instantiated" (difficult to find the right words to describe how
puppet behaves, given it's eccentric use of words like "class" and
"define").

These are really two significantly different meanings to "defined" and I
wonder if it's helpful to be using the same function for both.  I do
think it's potentially confusing.

This isn't an idle line of thought, by the way.  There's obviously a lot
of interest in class/module dependencies, which are not easy to create
or test.  Puppet would benefit from having a test for whether or not a
specific class has been included and, I think, for whether or not a
specific class *or one that inherits from it* has been included.

-- 
Bruce

A problem shared brings the consolation that someone else is now
feeling as miserable as you.

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