Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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}; }

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2016-10-21 10:14 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (288 votes). Check out past polls.