DBD::PassThrough - Pass through DBD
use DBI; my $orig_dbh = DBI->connect('dbi:SQLite::memory:', '', '', {RaiseError => 1}); my $dbh = DBI->connect('dbi:PassThrough:', '', '', {pass_through_source => $orig_dbh});
DBD::PassThrough is a proxy module betwen DSN to $dbh.
You can pass a existed $dbh as a new DBI connection's atribute.
THIS IS A DEVELOPMENT RELEASE. API MAY CHANGE WITHOUT NOTICE.
Some of the DBIx::* modules do not accepts $dbh as a argument, but arguments for DBI->connect. Then, it makes hard to use DBD::SQLite as a mock DB.
DBI->connect
Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install DBD::PassThrough, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBD::PassThrough
CPAN shell
perl -MCPAN -e shell install DBD::PassThrough
For more information on module installation, please visit the detailed CPAN module installation guide.