Re: CDBI not blessing my references

[prev] [thread] [next] [Date index for 2004/06/29]

From: Tony Bowden
Subject: Re: CDBI not blessing my references
Date: 17:31 on 29 Jun 2004
On Tue, Jun 29, 2004 at 04:18:23PM +0200, Alexander Gr?fe wrote:
> sub details2 {
>         my ($self,$lang) = shift;
>         my $rv={};
>         my @details = $self->details;
>         foreach my $detail ($self->details) {
>                 $rv = $detail if $detail->sprache->iso eq $lang
>         }
>         return $rv;
> }


> I *do* get something back, but when I try to call isa("Foo::Details") on the return value,
> I get a 'Can't call method "isa" on unblessed reference' error.

I would assume that your "if" is never returning true, and so you're
returning the empty hashref you set up in row 2.

Tony

CDBI not blessing my references
Alexander =?iso-8859-1?Q?Gr=E4fe?= 14:18 on 29 Jun 2004

Re: CDBI not blessing my references
Tony Bowden 17:31 on 29 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52