Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- connection 1: $dbh->oracle;
- connection 2: $dbh->sql
- use strict;
- use warnings;
- use DBI;
- my $dbh = DBI->connect( 'DBI:mysql:database=test;host=localhost', 'root', 'pw' );
- my $dbh2 = DBI->connect( 'DBI:mysql:database=test;host=localhost', 'root', 'pw' );
- DBI->visit_handles(
- sub {
- my ( $driver_handle, $info ) = @_;
- if ($driver_handle->{Type} eq 'db') {
- $driver_handle->disconnect;
- }
- return 1;
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement