I have
some
source code which makes a DBI call:
#!/usr/bin/env perl
use strict;
use warnings;
# core modules
use Data::Dumper;
use File::Basename 'dirname';
use File::Spec;
use List::Util qw(sum);
# cpan modules
use Mojolicious::Lite;
use autodie qw/:all/;
use DBI; #DBI->trace(1);
use SQL::Interp qw/:all/;
use Sys::Hostname;
# local modules
use lib join '/', File::Spec->splitdir( dirname(__FILE__) ), '..', 'li
+b';
use Local::DB;
use Local::Bitcoin;
my $bitcoin = Local::Bitcoin->new;
my $da = Local::DB->new->da;
DBI->trace(1);
my @m = $da->sqlarrayhash('SELECT * FROM v_missing_pledges');
The trace of the call "works" - it returns an array of hashrefs of the data from the query.
However, part of the DBI trace has me concerned. It claims something about an error that
is cleared by call to fetch method:
schemelab@li2-168:~/domains/com/elcaminoclaro/www/cleartrader/bin$ ./r
+eceived_pledges.pl
DBI 1.616-ithread default trace level set to 0x0/1 (pid 31485 pi 9
+52e008) at received_pledges.pl line 28
<- prepare('SELECT * FROM v_missing_pledges')= ( DBI::st=HASH(0xa8
+17544) ) [1 items] at Array.pm line 270
<- execute= ( 1 ) [1 items] at Array.pm line 288
<- FETCH('NAME')= ( [ 'pledger_id' 'sponsor_id' 'address' ] ) [1 i
+tems] at Array.pm line 500
!! ERROR: 2000 CLEARED by call to fetch method
<- fetchrow_hashref= ( HASH(0xa817904)3keys ) [1 items] row1 at Ar
+ray.pm line 503
!! ERROR: 2000 CLEARED by call to fetch method
<- fetchrow_hashref= ( undef ) [1 items] row1 at Array.pm line 504
<- finish= ( 1 ) [1 items] at Array.pm line 507
The
sqlarrayhash
method I am calling is fairly straightforward - it just prepares a SQL call with bind
parameters. I would appreciate some insight into why the trace has
!! ERROR: 2000 CLEARED by call to fetch method
in it and what that means, because everything seems to be working just fine.