Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: DBI specification change

by mp (Deacon)
on Jul 16, 2002 at 16:38 UTC ( #182144=note: print w/ replies, xml ) Need Help??


in reply to Re: DBI specification change
in thread DBI specification change

The DBI pod on version 1.20, that I've been using says (under fetchrow_hashref):

"Currently, a new hash reference is returned for each row. This will change in the future to return the same hash ref each time, so don't rely on the current behaviour."

I've been interpreting this to mean that it is not safe to use the returned hash directly and have been copying the hash like this:

my @rows; while(my $result = $sth->fetchrow_hashref) { push @rows, {%$result}; }


Comment on Re: Re: DBI specification change
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://182144]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-08-30 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls