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.



The mantra of every experienced web application developer is the same: thou shalt separate business logic from display. Ironically, almost all template engines allow violation of this separation principle, which is the very impetus for HTML template engine development.

-- Terence Parr, "Enforcing Strict Model View Separation in Template Engines"


In reply to DBI - !! ERROR: 2000 CLEARED by call to fetch method by metaperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.