[Dbix-class] list 2 columns for all records in table not working

Paul Findlay Paul.Findlay at fonterra.com
Wed Oct 17 02:30:58 GMT 2012


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 at fonterra.com direct +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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20121017/75f9664e/attachment.htm


More information about the DBIx-Class mailing list