[CDBI] CDBI and grep

[prev] [thread] [next] [Date index for 2006/01/16]

From: Rolf Schaufelberger
Subject: [CDBI] CDBI and grep
Date: 10:27 on 16 Jan 2006
Hi, 
I have a table users and and a table columns, 
users has_a company_id. Now, If I have a expression like

my $user = XY::Users->retrieve(123);
if ( grep /$user->company_id->id/, ( 1, 2, 3 ) ) 

i get no match even if the company_id is on of 1,2,3.
Neither 
if ( grep /$user->company_id/, ( 1, 2, 3 ) ) 
nor
if ( grep /"$user->company_id"/, ( 1, 2, 3 ) ) 
match,but 
my $id =  $user->company_id->id;
if ( grep /$id/, ( 1, 2, 3 ) ) 
does. I have no idea why the other expressions  above fail. 
There is no stringify function for company.


Rolf Schaufelberger
rs@xxxxx.xx

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] CDBI and grep
Rolf Schaufelberger 10:27 on 16 Jan 2006

Re: [CDBI] CDBI and grep
Paul Johnson 12:16 on 16 Jan 2006

Generated at 20:45 on 01 Mar 2006 by mariachi v0.52