in reply to Re: Dereferencing nested references
in thread Dereferencing nested references

I was able to use part of your code, as well as some of the above info I learned to get back the data I need. My thanks to all of you.

Now this bit below that you posted above is bothering me because I haven't been able to find any references to this attribute you set. Where did you find out how to do this litte miracle?

#force selectall_arrayref to return an arrayref of hashrefs my %attr = ( dbi_fetchall_arrayref_attr => {}, );


ryddler

Replies are listed 'Best First'.
Re: Re: Re: Dereferencing nested references
by btrott (Parson) on Jan 17, 2001 at 03:08 UTC
    You really just need to look at the source for DBI, version 1.14 (I think that's when this feature was added). It's not documented, as the Todo points out:
    document dbi_fetchall_arrayref_attr attr of selectall_arrayref().
    Anyway, the way this works is that this attribute controls the behavior of selectall_arrayref. If you don't set it, it defaults to an arrayref, which tells the method to fetch the rows as array refs and return an arrayref of those arrayrefs.

    If, however, you set it to a hash ref, that tells selectall_arrayref to fetch the rows as hash refs, and return an array ref of hash refs. Make sense?