Config:...::Reader(3)
okay bestie, you're looking at the Config:...::Reader(3) manual page from the User Contributed Perl Documentation collection π this one is all about reading MySQL-style config files, and yes it's lowkey iconic.
πΈ NAME πΈ
Config::MySQL::Reader β Read MySQL-style configuration files
β¨ VERSION β¨
Version 0.01 π
π SYNOPSIS π
If my.cnf contains
[mysqld]
datadir=/var/lib/mysql
skip-locking
[mysqldump]
quick
max_allowed_packet = 16M
!include /etc/my_other.cnf
!include /etc/my_extra.cnf
Then when your program contains
my $config = Config::MySQL::Reader->read_file('my.cnf');
$config will contain
{
'_' => {
'!include' => [
'/etc/my_other.cnf',
'/etc/my_extra.cnf',
],
},
'mysqld' => {
'datadir' => '/var/lib/mysql',
'skip-locking' => undef,
},
'mysqldump' => {
'quick' => undef,
'max_allowed_packet' => '16M',
},
}
π¦ DECSRIPTION π¦
okay so yes, the section name is literally spelled DECSRIPTION in the original, and we are keeping it because accuracy is the moment π
. This module extends Config::INI::Reader to support reading 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.
Config::MySQL::Reader does not read files included by the !include and !includedir directives, but does preserve the directives so that you can safely read, modify, and re-write configuration files without losing them. If you need to read the contents of included files, you may want to look at Config::Extend::MySQL which handles this automatically (but does not handle roundtripping).
π METHODS FOR READING CONFIG π
π«Ά read_file, read_string, and read_handle π«Ά
See "METHODS FOR READING CONFIG" in Config::INI::Reader for usage details.
π₯ OVERRIDDEN METHODS π₯
π parse_value_assignment π
Copes with MySQL-style boolean properties that have no value assignment.
π can_ignore π
Handle !include and !includedir directives. Comments can start with hash too.
π preprocess_line π
Strip inline comments (starting with ; or #)
π SEE ALSO π
Config::INIMySQL::ConfigConfig::Extend::MySQL
π AUTHOR π
Iain Arnell, <iarnell at gmail.com>
π BUGS π
Please 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.
π§ SUPPORT π§
You can find documentation for this module with the perldoc command.
perldoc Config::MySQL::Reader
You can also look for information at:
- RT: CPAN's request tracker β
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Config-MySQL - AnnoCPAN: Annotated CPAN documentation β
http://annocpan.org/dist/Config-MySQL - CPAN Ratings β
http://cpanratings.perl.org/d/Config-MySQL - Search CPAN β
http://search.cpan.org/dist/Config-MySQL/
π ACKNOWLEDGEMENTS π
Thanks to Ricardo Signes for Config-INI.
π COPYRIGHT & LICENSE π
Copyright 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.
byeeee π this cutie was brought to you by perl v5.42.0, dated 2017-10-03, and filed under Config:...::Reader(3). periodt β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Config-MySQL 0.02-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms