Config::General::Hierarchical::Dump - Hierarchical Generic Config Dumper Module
Simple use:
$ $ cat example.conf #!/usr/local/bin/perl -MConfig::General::Hierarchical::Dump variable1 value variable2 <node> key value </node> $ $ chmod 755 example.conf $ ./example.conf node->key = 'value' variable1 = 'value' variable2 = '' $ $
Full use:
package MyConfig::Dump; # use base 'Config::General::Hierarchical::Dump'; use MyConfig; # sub parser { return 'MyConfig'; }
This module provides an easy way to dump configuration files written for Config::General::Hierarchical.
Implicitally called by -M perl option, it reads the configuration file itself, dumps it to standard output and exits.
Returns the class name to be used to parse the file, by default Config::General::Hierarchical. If you exetend Config::General::Hierarchical with so many customization that you need to use your own class to parse the file, you can extend Config::General::Hierarchical::Dump as well and simply redefine this method to return your own class name and use this second new class as parameter of -M perl option.
Config::General::Hierarchical
Config::General::Hierarchical::Dump
This can beusefull to find immediatelly which are eventaul configuration variables not respecting the syntax constraint
Makes the source file (foreach variable) to be printed.
Formats the output as fixed characters length.
Prints an help screen and exits.
Prints the output as a json string.
Please report.
Copyright (c) 2007-2009 Daniele Ricci
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Daniele Ricci <icc |AT| cpan.org>
0.07
To install Config::General::Hierarchical, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::General::Hierarchical
CPAN shell
perl -MCPAN -e shell install Config::General::Hierarchical
For more information on module installation, please visit the detailed CPAN module installation guide.