I've a problem that's just driving me up a wall - not only is it very intermittant, but I can't think of how to debug it properly. I'm using CGI::SpeedyCGI for one of my larger scripts, and have been very happy with how it's working out. Now, I've migrated part of the script to use Class::DBI instead of my custom DB code. Most of the time, it works wonderfully. But sometimes, only sometimes, it blows up with the following error:
[Mon Oct 3 22:15:21 2005] script: MyApp::Sets can't SELECT id, id, se +tnumber, setrev, name, theme, year, pcs, figs, picture, msrp, instruc +tions, inventory [Mon Oct 3 22:15:21 2005] script: FROM SETS [Mon Oct 3 22:15:21 2005] script: WHERE ( ID = ? ) [Mon Oct 3 22:15:21 2005] script: : Not an ARRAY reference at /home/u +ser/lib/modules/Class/DBI.pm line 1124. [Mon Oct 3 22:15:21 2005] script: at /home/user/lib/modules/Class/DB +I/AbstractSearch.pm line 31
How would I track this down? The problem doesn't seem to be in my code, and even when I added some debugging code to CDBI:AbstractSearch, everything looked right:
[Mon Oct 3 21:21:58 2005] script: phrase = $VAR1 = '( Theme = ? )'; [Mon Oct 3 21:21:58 2005] script: [Mon Oct 3 21:21:58 2005] script: bind = $VAR1 = [ [Mon Oct 3 21:21:58 2005] script: 0 [Mon Oct 3 21:21:58 2005] script: ]; [Mon Oct 3 21:21:58 2005] script: MyApp::Sets can't SELECT id, id, se +tnumber, setrev, name, theme, year, pcs, figs, picture, msrp, instruc +tions, inventory [Mon Oct 3 21:21:58 2005] script: FROM SETS [Mon Oct 3 21:21:58 2005] script: WHERE ( Theme = ? ) [Mon Oct 3 21:21:58 2005] script: : Not an ARRAY reference at /home/u +ser/lib/modules/Class/DBI.pm line 1124. [Mon Oct 3 21:21:58 2005] script: at /home/user/lib/modules/Class/DB +I/AbstractSearch.pm line 33
The problem goes away if I stop using SpeedyCGI, but the performance hit is too much at this point. (yes, I should migrate to mod_perl, one day). Any ideas what I could try next to debug this? Thanks!

-- zigdon


In reply to Class::DBI::AbstractSearch and SpeedyCGI by zigdon

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.