AnyEvent-DBI

 view release on metacpan or  search on metacpan

DBI/Slave.pm  view on Meta::CPAN

   my (undef, $arg_string, $function) = @{+shift};
   my @args = eval $arg_string;

   die "error evaling \$dbh->func() arg_string: $@"
      if $@;

   my $rc = $DBH->func (@args, $function);
   return [1, $rc, $DBI::err, $DBI::errstr];
}

sub serve($$) {
   my ($fork_fh, $version, $fh) = @_;

   $0 = "dbi slave";

   close $fork_fh;

   if ($VERSION != $version) {
      Convert::Scalar::write_all $fh, CBOR::XS::encode_cbor
         [undef, "AnyEvent::DBI version mismatch ($VERSION vs. $version)"];
      return;



( run in 0.701 second using v1.01-cache-2.11-cpan-65fba6d93b7 )