hello Paul,

thx. That helped. even though i could see the 'HASH' in my output, i was under 
the impression (from the doc..) that i should get an array straightway.

now another problem. following is not working, i am currently using work 
around..


if ( $str=~/\b"$item->itemid"\b/ ) {    
....
        }

(i tried few things above, in the end)  my workaround

my $tmpvar=$item->itemid  ;
if ( $str=~/\b$tmpvar\b/ ) {    
....
        }


i was thinking if i do not have to use a variable just for one step...

________________________________
From: Paul Findlay <paul.find...@fonterra.com>
To: Rajeev Prasad <rp.ne...@yahoo.com>; DBIx::Class user and developer list 
<dbix-class@lists.scsys.co.uk> 
Sent: Tuesday, October 16, 2012 9:30 PM
Subject: RE: [Dbix-class] list 2 columns for all records in table not working



Hi Rajeev,

You are tried to print an array, and then tried to print each object in an 
array. Since each object is a blessed hash, the 
“Itemdb::Schema::Result::Itemlist=HASH(..)” is appearing because perl doesn’t 
know any better way to convert it to a string.

Have you considered:

foreach my $item (@items) {
    print $item->itemid, ' ', $item->artistid, "\n";
}

Instead?

This is documented in “Basic Usage” 
https://metacpan.org/module/DBIx::Class::Manual::Intro#Basic-usage

(sorry about the HTML email everyone)

Paul Findlay 
Process Information Engineer 
paul.findlay@fonterra.comdirect +64 7 849 7871
Fonterra Co-operative Group Limited, Te Rapa, Hamilton, New Zealand 

________________________________
DISCLAIMER
This email contains information that is confidential and which may be legally 
privileged. If you have received this email in error, please notify the sender 
immediately and delete the email. This email is intended solely for the use of 
the intended recipient
and you may not use or disclose this email in any way.        

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to