Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Unable to set handle class to DBI::db #37

Open
Wu-Wu opened this Issue · 0 comments

1 participant

@Wu-Wu

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.