Permalink
Browse files

Simplify/fix driver loading; now doesn't depend on compiler internals.

  • Loading branch information...
1 parent bd0881f commit d33b84a731278e63603dec05d726863edd480a49 @jnthn jnthn committed Jan 22, 2012
Showing with 0 additions and 10 deletions.
  1. +0 −10 lib/MiniDBI.pm6
View
@@ -13,16 +13,6 @@ class MiniDBI:auth<mberends>:ver<0.1.0> {
return $connection;
}
method install_driver( $drivername ) {
- # warn "in MiniDBI.install_driver('$drivername')";
- my $result;
- # the need($n, {} ) argument would be a hash of named argements,
- # but it dies with: get_pmc_keyed() not implemented in class ''
- # Perl6::Module::Loader.need( "MiniDBD::$drivername", {} );
- $result = Perl6::Module::Loader.need( "MiniDBD::$drivername" );
- unless $result {
- warn "install_driver cannot load MiniDBD::$drivername in $*PROGRAM_NAME";
- exit( 1 ); # instead of dying with an unnecessary stack trace
- }
my $driver;
given $drivername {
when 'CSV' { eval 'use MiniDBD::CSV; $driver = MiniDBD::CSV.new()' }

0 comments on commit d33b84a

Please sign in to comment.