DB-Evented

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

being it delays the execution until execute_in_parallel has been called. The results
can be accessed in the response attribute call back 

=cut

for my $method_name ( qw(selectrow_hashref selectcol_arrayref selectall_hashref selectall_arrayref) ) {
  no strict 'refs';
  *{$method_name} = sub {
    my $self = shift;
    my ($sql, $key_field, $attr, @args) = (shift, ($method_name eq 'selectall_hashref' ? (shift) : (undef)), shift, @_);
    $self->_add_to_queue($sql, $attr, $key_field, @args, $method_name, (caller)[1,2]);
  };
}

# TODO: Investigate if this is the bet way to handle this.
# The child processes are technically held by AnyEvent::DBI
# by clearing the known handlers these children *should* be reaped
sub DESTROY {
  my $error = do {
    local $@;
    eval {

lib/DB/Evented.pm  view on Meta::CPAN

being it delays the execution until execute_in_parallel has been called. The results
can be accessed in the response attribute call back 

=cut

for my $method_name ( qw(selectrow_hashref selectcol_arrayref selectall_hashref selectall_arrayref) ) {
  no strict 'refs';
  *{$method_name} = sub {
    my $self = shift;
    my ($sql, $key_field, $attr, @args) = (shift, ($method_name eq 'selectall_hashref' ? (shift) : (undef)), shift, @_);
    $self->_add_to_queue($sql, $attr, $key_field, @args, $method_name, (caller)[1,2]);
  };
}

# TODO: Investigate if this is the bet way to handle this.
# The child processes are technically held by AnyEvent::DBI
# by clearing the known handlers these children *should* be reaped
sub DESTROY {
  my $error = do {
    local $@;
    eval {



( run in 0.837 second using v1.01-cache-2.11-cpan-a3c8064c92c )