Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 meditating upon the Monastery: (12)
As of 2014-12-26 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (167 votes), past polls