Class::ConfigHashLazily turn multi-level hashes of configuration data in to objects with error catching and defaults | |
Download |
Class::ConfigHash Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Peter Sergeant
- Publisher web site:
- http://search.cpan.org/~sargie/
Class::ConfigHash Tags
Class::ConfigHash Description
Class::ConfigHash is a Perl module to lazily turn multi-level hashes of configuration data in to objects with error catching and defaults.SYNOPSIS my $config = Class::ConfigHash->_new({ database => { user => 'rodion', pass => 'bonaparte', options => { city => 'St Petersburg' }, }, }); $config->database->options->city; # St Petersburg # Dies: Can't find 'flags' at . Options: $config->database->flags; # Won't die, returns undef $config->database->flags({ allow_undef => 1 }); # Won't die, returns 'foo' $config->database->flags({ default => 'foo' }); # Access the underlying structure $config->database({ raw => 1 })->{'user'} = 'raskolnikov';Product's homepage
Class::ConfigHash Related Software