}
sub _exec_calling {
- my ($self, $call, @sth_args) = @_;
- $self->_exec(sub {
- $self->_sth_for($_[0], @sth_args)->$call
- });
+ my ($self, $sth_method, $to_call, $sth_args) = @_;
+
+ $self->_exec(
+ ref($to_call) eq 'CODE'
+ ? sub { $self->$to_call($sth_method, $_[0], $sth_args) }
+ : sub {
+ $self->_sth_for($_[0], $to_call, $sth_args)->$sth_method
+ }
+ );
}
sub _exec {