There's more than one way to do things | |
PerlMonks |
Re: passing objects as references ?by mr.nick (Chaplain) |
on Dec 08, 2011 at 15:37 UTC ( [id://942466]=note: print w/replies, xml ) | Need Help?? |
The problem appears to be this line:
my $sth = $dbu->execute( \$dbh, \$query, \$errmsg ); My::DBU::execute is looking for one parameter (beyond $self), a scalar, $query. $dbh is being pulled from $self, so you don't need to pass it in. And I'm not sure what passing $errmsg into the method is supposed to do. This would probably work: my $sth = $dbu->execute( $query ); Note that returning the statement handle is kind of odd since you retrieve the $rows inside the method. mr.nick ...
In Section
Seekers of Perl Wisdom
|
|