[Melbourne-pm] How to create data structures with 'default values'

Ian Macdonald ickphum at gmail.com
Mon Nov 17 03:43:46 PST 2008


I'm a fan of sucking that kind of default config out of a YAML file.

On Mon, Nov 17, 2008 at 8:30 PM, Alec Clews <alec.clews at gmail.com> wrote:

> G'Day Perl Bunnies,
>
> I have created a hash structure with a set of environment specific keys
> and values.
>
> * There is a different hash for each of the environments.
>
> * Many of the values are the same (default) across all the
> environments.
>
> What is the easy way of setting up the defaults once and then have each
> environment overwrite the default values with specific settings?
>
> Currently I have a hash of defaults. However it's a pain to define each
> specific value or assign the default value for every single key in every
> single environment.
>
> Thanks.
>
>
> -
> Alec Clews <alec.clews at voga.com.au>               Principal Consultant
> Jabber: alecclews at jabber.org.au               Voga Consulting Services
> skype: alecclews      Voice: +61(425)770-886   http://www.voga.com.au/
> blog:http://alecthegeek.wordpress.com/            Melbourne, Australia
>
>
>
> --
> Alec Clews
> Personal <alec.clews at gmail.com>             Melbourne, Australia.
> Jabber:  alecclews at jabber.org.au             PGPKey ID: 0x9BBBFC7C
> Blog  http://alecthegeek.wordpress.com/
>
>
> _______________________________________________
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
> http://mail.pm.org/mailman/listinfo/melbourne-pm




-- 
Ian Macdonald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20081117/b1b93e47/attachment.html>


More information about the Melbourne-pm mailing list