Config:...::Writer(3)

πŸ“¦ version 0.02, in opensuse-leap 16.0

πŸ’… Config::MySQL::Writer(3) β€” like, the whole manual, bestie

okay so quick vibe check first: this is a User Contributed Perl Documentation page for Config::...::Writer(3) (yes the name gets truncated all cute in the header, it's Config::MySQL::Writer fr fr). It's gonna teach you how to write MySQL-style config files with Perl. Buckle up, it's actually so good πŸŽ€


✨ NAME ✨

Config::MySQL::Writer β€” Write MySQL-style configuration files πŸ¦‹

🌸 VERSION 🌸

Version 0.01 β€” baby's first release, and she ate πŸ’…

⭐ SYNOPSIS ⭐

okok so imagine $config contains this whole nested hash situation:

{
    '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 this line, right here:

my $config = Config::MySQL::Writer->write_file( $config, 'my.cnf' );

my.cnf will contain this, no cap:

!include /etc/my_extra.cnf
!include /etc/my_other.cnf
!includedir /etc/my.cnf.d

[mysqld]
datadir=/var/lib/mysql
skip-locking

[mysqldump]
quick
max_allowed_packet = 16M

like… she understood the assignment 😭πŸ”₯

πŸ’– DESCRIPTION πŸ’–

So this module extends Config::INI::Writer to support writing MySQL-style configuration files. It's lowkey deceptively similar to your standard .INI files β€” key word deceptively, bestie, do not get it twisted πŸ™ˆ β€” but MySQL-style files can also include bare boolean options with no value assignment, plus extra little features like !include and !includedir. It's giving INI but make it extra ✨

🫢 METHODS FOR WRITING CONFIG 🫢

write_file, write_string, and write_handle

For the usage details, go read "METHODS FOR WRITING CONFIG" in Config::INI::Writer β€” that's where the actual how-to lives, iykyk. πŸ“–

🧚 OVERRIDDEN METHODS 🧚

stringify_value_assignment

This one copes with MySQL-style include directives and boolean properties that have no value assignment. Like she's emotionally handling both at once, queen behavior πŸ‘‘πŸ’œ

πŸ”₯ SEE ALSO πŸ”₯

  • Config::INI
  • MySQL::Config
  • Config::Extend::MySQL

go read those too, they're the friend group 🌈

🌸 AUTHOR 🌸

Iain Arnell, "<iarnell at gmail.com>" β€” ty for your service king 🫑

πŸ’€ 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>.

and like, hear her out: she will be notified, and then you'll automatically be notified of progress on your bug as she makes changes. communication icon behavior fr fr πŸ“¬

πŸ“ SUPPORT πŸ“

You can find documentation for this module with the perldoc command:

perldoc Config::MySQL::Writer

You can also look for information at:

like four whole places to find her, she's everywhere πŸ’…βœ¨

πŸŽ€ ACKNOWLEDGEMENTS πŸŽ€

Thanks to Ricardo Signes for Config-INI β€” real ones know πŸ™πŸ’–

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.


and that's the whole page bestie, mwah πŸ’‹ β€” brought to you by perl v5.42.0, dated 2017-10-03, signed off with love from the Config:...::Writer(3) girlies πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from