Subject: | no failover if a coderef data source fails to connect |
Hi,
If a dsource is a coderef and it fails to connect to its database server
and returns a false value, then execution drops off the end of this
block in _connect_dsource(), which then goes on to break when it tries
to use the coderef as an arrayref:
# Support code-refs which return handles
if (ref $dsource eq 'CODE') {
my $handle = $dsource->();
return $handle if UNIVERSAL::isa($handle, 'DBI::db');
}
This prevents failover to other data sources if the first one tried is
unavailable at connect time.