-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

>>> I highly recommend against using import today and in the future.
>> 
>> The cure is in this case worse, *much* worse, than the illness of
>> having to do explicit imports.  I'd rather have two dozen import
>> lines in site.pp (which is what I have now) than having to split my
>> classes and defines into almost 200 files in two dozen
>> directories.
> 
> I'll try to post an example soon, but you don't have to split it up
> into "200 files" to take advantage of autoloading.  You would need to
> split it into "two dozen directories" though.
> 
> On the other hand, you can put everything into site.pp.  I'm sure
> you'll agree that this is a mistake too.  I use modules but I don't
> split a module's manifest (init.pp) into different files until the
> file starts to get large.
> 
> For instance, you could put all your classes into
> /modules/module-name/init.pp.  This works well if all but one or two
> class are really small.  This is what I do by default because if I
> put "include cups::client" in site.pp, puppet will auto import: 
> /modules/cups/init.pp /modules/cups/client.pp 
> /modules/cups/client/init.pp (I think this last one is true, but I
> don't know)
> 
> I like the different folders because it keeps the files and templates
> with the manifests, and t makes it easier to tell which files can
> safely be deleted.
> 
> For me, the key to keeping things easy was to remember that I didn't
> need to break a module into more than one file, but I could if they
> got too big.

+1 this is just small, clean and easy understandable. I got rid of every
import in my manifests and I would consider them as code smell.

cheers pete
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwyNNYACgkQbwltcAfKi3+xSACfT+V4HTPHKXhdOf62ofGuI7Ng
PfUAn3T5eFjKJtvk0WyJWwMOZpwZzAaQ
=eQgf
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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