Re: Overload error -- Operation `eq': no method found
[prev]
[thread]
[next]
[Date index for 2005/04/28]
On Thu, Apr 28, 2005 at 01:10:41PM -0400, Juan Camacho wrote:
> This is a shot in the dark, but I wonder if anyone has come across an
> error like this under a mod_perl environment. I'm unable to duplicate
> outside of our production environment, which makes this quite hard to
> track.
>
> Operation `eq': no method found,
> left argument in overloaded package Onyx::DB::RTMType,
> right argument in overloaded package Onyx::DB::RTMType
>
>
> The code the produces it is something like this:
> my $type = $rtm->rtm_type;
> my $current_type = $current_rtm->rtm_type;
> return 1 if $type eq $current_type;
>
> # RTM has_a RTMType;
>
> We are running CDBI version 0.95, Apache/1.3.27 (Unix) mod_perl/1.27
>
> Even wild guesses are welcome :)
Something's gone wrong in the stringification somewhere, I'd guess.
How about
return 1 if $type->id == $current_type->id; # assuming numeric pk
instead?
--
Matt S Trout Brag sheet: http://trout.me.uk/services.html
LAMP, Infrastructure Contact: services@xxxxx.xx.xx
and Automation
specialist Do it once. Do it right.
|
|
Re: Overload error -- Operation `eq': no method found
Matt S Trout 17:24 on 28 Apr 2005
|