App-AltSQL
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.68.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
lib/App/AltSQL/Model/MySQL.pm view on Meta::CPAN
# ignore lines in file until we hit a valid [section]
# then read key=value pairs
my $in_valid_section = 0;
while(<MYCNF>) {
# ignore commented lines:
/^\s*#/ && next;
if (/^\s*\[(.*?)\]\s*$/) { # we've hit a section
# verify that we're inside a valid section,
# and if so, set $in_valid_section
if ( grep $_ eq $1, @valid_sections ) {
$in_valid_section = 1;
} else {
$in_valid_section = 0;
}
} elsif ($in_valid_section) {
# read a key/value pair
#/^\s*(.+?)\s*=\s*(.+?)\s*$/;
lib/App/AltSQL/Model/MySQL.pm view on Meta::CPAN
$key =~ s/-/_/g;
$val || ( $val = '' );
$val && $val =~ s/\s*$//;
# special case for no_auto_rehash, which is 'skip-auto-rehash' in my.cnf
if ($key eq 'skip_auto_rehash') {
$key = 'no_auto_rehash';
}
# verify that the field is one of the supported ones
unless ( grep $_ eq $key, @valid_keys ) { next; }
# if this key is expected to be a boolean, fix the value
if ( grep $_ eq $key, @boolean_keys ) {
if ($val eq '0' || $val eq 'false') {
$val = 0;
} else {
# this includes empty values
$val = 1;
}
( run in 0.267 second using v1.01-cache-2.11-cpan-73692580452 )