|
From: Ken Youens-C. <ky...@gm...> - 2005-11-03 14:53:41
|
Here's a very tricky little thing that got me for a few hours. In
SPOPS::DBI at line 342, there's this:
next ROW unless ( $obj ); # How could this ever be true?
In my SPOPS hierarchy, I had defined a class that overloads q{""} to
stringify an SPOPS object. I had a bug in that code that caused the
object to stringify to the empty string, so the above test failed
every time causing "fetch_group" to return nothing.
I'd like to suggest that be changed to something else, possibly
"defined" or maybe check "keys %$obj" or something a little more
rigorous. Granted, the error was mine, but what if a stringification
returned a valid "0"?
ky
|