# this confuses CXSA: https://rt.cpan.org/Ticket/Display.html?id=103296
$self->_dbh_details->{info} || do {
+ # this guarantees that problematic conninfo won't be hidden
+ # by the try{} below
+ $self->ensure_connected;
+
my $info = {};
my $server_version = try {
sub _do_connection_actions {
my ($self, $method_prefix, $call, @args) = @_;
+ try {
if (not ref($call)) {
my $method = $method_prefix . $call;
$self->$method(@args);
else {
$self->throw_exception (sprintf ("Don't know how to process conection actions of type '%s'", ref($call)) );
}
+ }
+ catch {
+ if ( $method_prefix =~ /^connect/ ) {
+ # this is an on_connect cycle - we can't just throw while leaving
+ # a handle in an undefined state in our storage object
+ # kill it with fire and rethrow
+ $self->_dbh(undef);
+ $self->throw_exception( $_[0] );
+ }
+ else {
+ carp "Disconnect action failed: $_[0]";
+ }
+ };
return $self;
}