$ grep -l fetchrow_hashref *
Changes
DBI.pm
DBI.xs <==
DBIXS.h
test.pl
Tim.
On Mon, Oct 22, 2001 at 04:52:35PM -0700, Terrence Brannon wrote:
>
> On Monday, October 22, 2001, at 01:32 PM, Wiedmann, Jochen wrote:
>
> >
> >> no, what I am saying is that I could not look at the DBI.pm
> >> source code
> >> and find a fetchrow_hashref anywhere, although I wanted to
> >> look at such
> >> a function so that I could answer this question myself.
> >
> > Most of DBI is written in C. However, fetchrow_hashref is
> > one of the exceptions, see line 1083 of DBI.pm. It's fairly
> > simple.
> >
> I did look at line 1083 and the definition of fetchrow_hashref is not
> there. In fact I search for fetchrow_hashref all throughout DBI.pm and
> the results show no "sub fetchrow_hashref"
>
> 55: $hash_ref = $sth->fetchrow_hashref;
> 316: fetchrow_hashref => undef,
> 968: sub selectrow_hashref { return
> _do_selectrow('fetchrow_hashref', @_\
> ); }
> 1184: while ($row = $sth->fetchrow_hashref('NAME_lc')) {
> 1192: push @rows, $row while ($row = $sth->fetchrow_hashref());
> 1213: while (my $row = $sth->fetchrow_hashref($hash_key_name)) {
> 2194:fetchrow_hashref() method should use to get the field names for the
> 2415:C<fetchrow_hashref>.
> 2421:If any method except C<fetchrow_hashref> fails, and L</RaiseError>
> is not\
> set,
> 2422:C<selectall_hashref> will return C<undef>. If C<fetchrow_hashref>
> fails \
> and
> 3432:=item C<fetchrow_hashref>
> 3434: $hash_ref = $sth->fetchrow_hashref;
> 3435: $hash_ref = $sth->fetchrow_hashref($name);
> 3441:If there are no more rows or if an error occurs, then
> C<fetchrow_hashref>
> 3454:Because of the extra work C<fetchrow_hashref> and Perl have to
> perform, i\
> t
> 3486:When passed a hash reference, C<fetchall_arrayref> uses
> L</fetchrow_hashr\
> ef>
> 3488:fetchrow_hashref is simply called in a tight loop and the keys in
> the has\
> hes
> 3489:have whatever name lettercase is returned by default from
> fetchrow_hashre\
> f.
>