[Dbix-class] [newbie]How to call stored procedure?(doc already read)

Peter Flanigan pjf at RoxSoft.co.uk
Sat Dec 29 11:35:56 GMT 2007


Tony Winslow wrote:
> Danny Warren wrote:
>> It would be helpful if you could post a code sample.  I am sure
>> someone could spot it quickly that way (more eyes, etc etc).
>>
>> Check to make sure the first argument to your search call is truly
>> undef, and make sure you are passing your array of bind values as a
>> reference.
>>
>> This is the error I get when I fat-finger in a search call, and
>> checking for undefs and refs at the offending point is the first
>> thing I try.
>>
> Here is my codes:
>
> # Document.pm -- Controller
> ......
> sub test : Local {
>    my ($self, $c) = @_;
>    my @cnt;
> #  my $cnt;
>    $c->model('MyDB::RevComp')->search(
>        undef,
>        bind => \@cnt
> #      bind => \$cnt
>    );
>    .......
> }

And as Danny pointed out, you are missing the {} around bind => \@cnt

Regards




More information about the DBIx-Class mailing list