Subject: | Bug: Apache::DBI->setPingTimeOut() is case sensitive |
Date: | Fri, 10 Jan 2014 06:44:25 +1100 |
To: | bug-Apache-DBI [...] rt.cpan.org |
From: | Max Barry <max_barry [...] maxbarry.com> |
Apache::DBI->setPingTimeOut($data_source, $timeout) silently fails when
$data_source begins with "DBI:" rather than "dbi:", due to these lines
(88-92):
# sanity check
if ($data_source =~ /dbi:\w+:.*/ and $timeout =~ /\-*\d+/) {
$PingTimeOut{$data_source} = $timeout;
}
The check is case-sensitive, unlike everywhere else. This can be easily
fixed:
if ($data_source =~ /dbi:\w+:.*/i and $timeout =~ /\-*\d+/) {
This affects all versions of Apache::DBI including 1.12.
Thanks,
Max.