on 7/9/03 8:03 AM, [EMAIL PROTECTED] purportedly said:

> sub create_order_redistribution_matrix
> {
> 
> my $inref = shift;
> 
> my $sth = $inref->{dbh}->prepare(qq|select * from affiliate_account
> where aa_affiliateid like "| . lc($inref->{master_affiliate}) . qq|" AND
> aa_deleted = 'false'|);
> }
> 
> # i get this error Can't call method "prepare" on an undefined value at
> /var/www/htdocs/cgi-bin//OxcartAPIs/Lib.pm line 731.

Considering the statement from your first email:

> $lib->create_order_redistribution_matrix($inref);

Keep in mind that $inref inside create_order_redistribution_matrix() is
actually a copy of $lib, *not* the passed $inref. In Perl OOP the first
parameter is *always* a reference to the object itself.

Perhaps you should try:

My( $self, $inref ) = @_;

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Reply via email to