[CDBI] overloaded operator problem
Peter Speltz
peterspeltz at gmail.com
Thu Jun 1 15:34:05 BST 2006
On 6/1/06, Rolf Schaufelberger <rs at plusw.de> wrote:
> Hi,
> I get the follwing error message:
>
> Operation `eq': no method found,
> left argument in overloaded package PW::DB::Company,
> right argument has no overloaded magic
> at /serv/perl/lib//PW/PermissionManager.pm line 15.
> context:
> ...
> 11:
> 12: sub grants($$$$) {
> 13: my ( $this, $user, $action, $resource ) = @_;
> 14: return 0 unless $action eq 'admin';
> 15: return 1 if ( $user->company_id() eq '1' || $user->company_id() eq
> '2' );
> 16: return 0;
> 17: }
I'd expect that to work. What version of CDBI? does explicityl
comparing ids work like below? I always do that anyway because i am
quite fond of stringifying objects in meaninful ways.
return 1 if ( $user->company_id->id eq '1' || $user->company_id->eq
'2' );
More information about the ClassDBI
mailing list