Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: DBIx::Simple opinion..by Qiang (Friar) |
on Aug 28, 2007 at 16:11 UTC ( [id://635637]=note: print w/replies, xml ) | Need Help?? |
i like to use hashes method in DBIx::Simple. however it is very inefficient and i am wondering why you don't use bind_columns as mentioned in DBI bind_columns
personally i do it in the following way which eqivalent to fetchall_hashref. not sure how much efficient it is though.
my (%row, @rows); $sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } )); while( $sth->fetch ) { push @rows, { %row }; }
In Section
Seekers of Perl Wisdom
|
|