Hi,

macros in puppets -> http://forge.puppetlabs.com/ptomulik/macro

They're similar to parser functions with three differences: 

   - macro names may resemble names of puppet variables/bindings, e.g. 
   'foo::bar::geez'
   - stored in a hierarchy of directories, that is (for macro 
   'foo::bar::geez'): 
   
      + lib/puppet/parser/macros/
        + foo/
          + bar/
            + geez.rb

   - they're a little bit easier to implement than functions, because arity 
   checking is provided out of the box

In some cases these macros may be more handy than 'params' classes when 
defining defaults for parameters. For example defaults for defined types 
which vary from instance to instance, or values which are hard to be 
computed in puppet DSL may be easily handled with macros. 

Leave a comment, if you find it useful or useless.

Regards!
-- 
Pawel Tomulik

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/1f08465e-0386-4045-8399-26d00888618e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to