On Oct 26, 2:56 am, Felix Frank <[email protected]>
wrote:
> Please note that requiring resources from foreign classes is generally
> bad practice.
> If possible, require the whole class that defines the resource.


Yes, that seems to be the prevailing opinion, but I am a bit looser
myself.  For me, it's a question of documentation and interface.  I
see no problem inherent in having a class document that it declares
certain resources, with the intent that other classes' resources may
depend on them.  Those resources are thereby made part of the
declaring class's external interface.

On the other hand, it is asking for future trouble for a class to
depend on foreign classes' resources thatare *not* documented
available for that purpose.  Inasmuch as I suspect the practice of
documenting resources into a class's interface is not widespread, in
most situations my position boils down to the one Felix described.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to