Subject: | DSN regex match needs to be case insensitive |
I'm running an older version of Dancer::Plugin::Database but this issue is still in Dancer::Plugin::Database::Core.
Warning: Use of uninitialized value $driver in hash element at /usr/share/perl5/vendor_perl/Dancer/Plugin/Database.pm line 177.
- ($driver) = $dsn =~ m{dbi:([^:]+)};
+ ($driver) = $dsn =~ m{^dbi:([^:]+)}i;
Issue is that the regex is not case insensitive but DBI allows mixed case.
The documentation at http://search.cpan.org/~timb/DBI-1.632/DBI.pm is actually ambiguous.
It says this.
Show quoted text
> scheme is the first part of the DSN and is currently always 'dbi'.
but the first example is
Show quoted text> DBI->parse_dsn("DBI:MyDriver(RaiseError=>1):db=test;port=42");
Thanks,
Mike
mrdvt92