Anyone here have any experience with Class::DBI?  I'm starting to
convert my custom DBI class to use Class::DBI, but I'm running into
weird errors.  

One of my pages looks up multiple objects, one by one, from a queue.
this was working ok (even after converting to CDBI), but now, after
successfully looking up a few of the objects, it blows up with the
following error:

  Peeron2::Sets can't SELECT id, id, setnumber, setrev, name, theme, year, pcs, 
figs, picture, msrp, instructions, inventory
  FROM   SETS
  WHERE  ( ID = ? )
  : Not an ARRAY reference at /usr/home/peeron/lib/modules/Class/DBI.pm line 
1126.
   at /usr/home/peeron/lib/modules/Class/DBI/AbstractSearch.pm line 32
   
Odd, I think, but ok.  So I try to run it under the debugger (from the
command line):

  qs546$ perl -Td ./apply > /dev/null
   
  Loading DB routines from perl5db.pl version 1.23
  Editor support available.
   
  Enter h or `h h' for help, or `man perldebug' for more help.
   
  main::(./apply:15):     $|=1;
    DB<1> c
  [Wed Oct 19 09:51:00 2005] apply: Use of uninitialized value in join or 
string at /usr/home/peeron/lib/modules/Peeron/UserObj.pm line 121.
  [Wed Oct 19 09:51:00 2005] apply: Use of uninitialized value in join or 
string at /usr/home/peeron/lib/modules/Peeron/UserObj.pm line 121.
  [Wed Oct 19 09:51:00 2005] apply: Attempt to free unreferenced scalar: SV 
0x87f38f0 at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:00 2005] apply: Attempt to free unreferenced scalar: SV 
0x8ca4c78 at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:00 2005] apply: Attempt to free unreferenced scalar: SV 
0x89be538 at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:01 2005] apply: Attempt to free unreferenced scalar: SV 
0x8cb8168 at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:01 2005] apply: Attempt to free unreferenced scalar: SV 
0x8cb812c at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:01 2005] apply: Attempt to free unreferenced scalar: SV 
0x8cbc98c at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:01 2005] apply: Attempt to free unreferenced scalar: SV 
0x8cbca1c at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:01 2005] apply: Attempt to free unreferenced scalar: SV 
0x8cbcedc at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:51:01 2005] apply: Attempt to free unreferenced scalar: SV 
0x8cbca28 at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  Debugged program terminated.  Use q to quit or R to restart,
    use O inhibit_exit to avoid stopping after program termination,
    h q, h R or h O to get additional info.
    DB<1> q

Everything worked ok!  (Those unreferenced warnings are something else
I'd like to look up, but they do not seem to be related).  And just to
make sure it's not just working because I'm calling it from the command
line, I tried to run it again, this time without the debugger:

  qs546$ perl -T ./apply > /dev/null
  [Wed Oct 19 09:50:37 2005] apply: Use of uninitialized value in join or 
string at /usr/home/peeron/lib/modules/Peeron/UserObj.pm line 121.
  [Wed Oct 19 09:50:37 2005] apply: Use of uninitialized value in join or 
string at /usr/home/peeron/lib/modules/Peeron/UserObj.pm line 121.
  [Wed Oct 19 09:50:38 2005] apply: Attempt to free unreferenced scalar: SV 
0x8804de0 at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:50:38 2005] apply: Attempt to free unreferenced scalar: SV 
0x880a2ac at /usr/home/peeron/lib/modules/Class/DBI.pm line 1127.
  [Wed Oct 19 09:50:38 2005] apply: Peeron2::Sets can't SELECT id, id, 
setnumber, setrev, name, theme, year, pcs, figs, picture, msrp, instructions, 
inventory
  [Wed Oct 19 09:50:38 2005] apply: FROM   SETS
  [Wed Oct 19 09:50:38 2005] apply: WHERE  ( ID = ? )
  [Wed Oct 19 09:50:38 2005] apply: : Not an ARRAY reference at 
/usr/home/peeron/lib/modules/Class/DBI.pm line 1126.
  [Wed Oct 19 09:50:38 2005] apply:  at 
/usr/home/peeron/lib/modules/Class/DBI/AbstractSearch.pm line 32

Sure enough, it blew up.  Anyone have any suggestions how I'd go about
figuring out what's causing this? 

For reference, here's the (somewhat unfocused) thread on PM where I
asked for help with the same issue.  If nothing else, it shows the
problem isn't just with this one script:

  http://perlmonks.org/index.pl?node_id=497114

Any help would be greatly appreciated!

-- 
Dan Boger
[EMAIL PROTECTED]
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to