Skip Menu |

This queue is for tickets about the Class-DBI-Loader CPAN distribution.

Report information
The Basics
Id: 13455
Status: resolved
Priority: 0/
Queue: Class-DBI-Loader

People
Owner: Nobody in particular
Requestors: mah [...] everybody.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.22
Fixed in: (no value)



Subject: CDBI::Loader will fail w/o a proper error message
Class::DBI::Loader 0.22 new() uses a regexp to tell which Class::DBI::Loader::* to use. It still tries to load something, even if the regexp didn't match anything. It would be nice to die if the regexp doesn't match anything. Otherwise, the programmer ends up checking the code only to discover that they made a typo. my ($driver) = $dsn =~ m/^dbi:(\w*?)(?:\((.*?)\))?:/i; + die "Didn't find a proper DSN in '$dsn'\n" + unless $driver; $driver = 'SQLite' if $driver eq 'SQLite2';