![]() |
![]()
| ![]() |
![]()
NAMEConfig::MySQL::Writer - Write MySQL-style configuration files VERSIONVersion 0.01 SYNOPSISIf $config contains { 'mysqld' => { 'datadir' => '/var/lib/mysql', 'skip-locking' => undef, }, 'mysqldump' => { 'quick' => undef, 'max_allowed_packet' => '16M', }, '_' => { '!include' => [ '/etc/my_extra.cnf', '/etc/my_other.cnf', ], '!includedir' => [ '/etc/my.cnf.d', ], }, } Then when your program contains my $config = Config::MySQL::Writer->write_file( $config, 'my.cnf' ); my.cnf will contain
[mysqld] datadir=/var/lib/mysql skip-locking [mysqldump] quick max_allowed_packet = 16M DESCRIPTIONThis module extends Config::INI::Writer to support writing MySQL-style configuration files. Although deceptively similar to standard ".INI" files, they can include bare boolean options with no value assignment and additional features like "!include" and "!includedir". METHODS FOR WRITING CONFIGwrite_file, write_string, and write_handleSee "METHODS FOR WRITING CONFIG" in Config::INI::Writer for usage details. OVERRIDDEN METHODSstringify_value_assignmentCopes with MySQL-style include directives and boolean properties that have no value assignment SEE ALSOAUTHORIain Arnell, "<iarnell at gmail.com>" BUGSPlease report any bugs or feature requests to "bug-config-ini-mysql at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Config-MySQL>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORTYou can find documentation for this module with the perldoc command. perldoc Config::MySQL::Writer You can also look for information at:
ACKNOWLEDGEMENTSThanks to Ricardo Signes for Config-INI. COPYRIGHT & LICENSECopyright 2010 Iain Arnell. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.
|