bigpresh / bigpresh/Dancer-Plugin-Database

Unable to set handle class to DBI::db

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
39
Forks
36
PR merge metrics
No merged PRs in 30d

Description

If pointed to use `handle_class: 'DBI::db'`, the plugin tries to require `DBI/db.pm` module and Dancer raises an exeption because DBI::db package located inside DBI.pm module.

At the moment I dont know how to handle this. May be a hashref of classes and its packages to load will be used. E.g.

```
$special = {
'DBI::db' => 'DBI.pm',
'DBD::Proxy::db' => 'DBD/Proxy.pm',
...
};

if (exists $special->{$handle_class}) {
$package = $special->{$handle_class};
}
else {
$package = $handle_class;
$package =~ s{::}{/}g;
$package .= '.pm';
}

require $package;
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.