use DBIx::Class::Carp;
use Scope::Guard ();
use Context::Preserve 'preserve_context';
-use Try::Tiny;
-use List::Util 'first';
-use DBIx::Class::_Util 'modver_gt_or_eq_and_lt';
+use DBIx::Class::_Util qw( modver_gt_or_eq_and_lt dbic_internal_try );
use namespace::clean;
__PACKAGE__->sql_limit_dialect ('RowNum');
local $dbh->{RaiseError} = 1;
local $dbh->{PrintError} = 0;
- return try {
+ ( dbic_internal_try {
$dbh->do('select 1 from dual');
1;
- } catch {
- 0;
- };
+ })
+ ? 1
+ : 0
+ ;
}
sub _dbh_execute {
my ($self, $sql, $bind) = @_[0,2,3];
# Turn off sth caching for multi-part LOBs. See _prep_for_execute below
- local $self->{disable_sth_caching} = 1 if first {
+ local $self->{disable_sth_caching} = 1 if grep {
($_->[0]{_ora_lob_autosplit_part}||0)
>
(__cache_queries_with_max_lob_parts - 1)