Subject: | A problem of sub abstract : lvalue |
Hi Juerd,
DBIx::Simple is my favorite.(What a pretty API!)
But I frequently received the following errors.
Can't call method "select" on an undefined value at
/usr/local/share/perl/5.8.4/DBIx/Simple.pm line 209.
or
Can't call method "update" on an undefined value at
/usr/local/share/perl/5.8.4/DBIx/Simple.pm line 209.
or
Can't call method "delete" on an undefined value at
/usr/local/share/perl/5.8.4/DBIx/Simple.pm line 209.
or
Can't call method "insert" on an undefined value at
/usr/local/share/perl/5.8.4/DBIx/Simple.pm line 209.
Because, In this case (DBIx/Simple.pm line 209)
$self->abstract->$method(@_)
Want.pm say that it is not a RVALUE.
I am applying this patch for myself.
--- DBIx/Simple.pm.org 2006-04-10 19:19:30.000000000 +0900
+++ DBIx/Simple.pm.edit 2006-04-10 19:17:50.000000000 +0900
@@ -67,7 +67,7 @@
sub abstract : lvalue {
require SQL::Abstract;
- $_[0]->{abstract} ||= SQL::Abstract->new if _want('RVALUE');
+ $_[0]->{abstract} ||= SQL::Abstract->new; # if _want('RVALUE');
$_[0]->{abstract}
}
How about this?
--
Tomi