Re: [CDBI] Re: Script that crashes mod_perl
Eric Just <e-just-angj7XTnwNpXfO9P/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
>
>To follow up on this mainly for posterity's sake:
>
>Changing the following line in Class/DBI.pm's sth_to_objects method:
>from
>$sth->bind_columns(\(@data{ @{ $sth->{NAME_lc} } }));
>to
>$sth->bind_columns(\(@data{ @{ $sth->{NAME} } }));
>
>Eliminated the problem. This seems OK since the FetchHashKeyName option
>is passed to the database connection. Probably not advisable for
>everyone, but for me, this little fix is needed. Not sure if the problem
>is with DBI, DBD::Oracle, or Windows, or some deadly combination thereof,
>but Windows/Oracle definitely does not like the $sth->{'Name_lc'} key for
>statement handles here.
Last post here, I put the previously reported fix into production and it
did not work quite right, here is the correct fix, that is also portable:
Changing the following line in Class/DBI.pm's sth_to_objects method: from
$sth->bind_columns(\(@data{ @{ $sth->{NAME_lc} } }));
to
$sth->bind_columns(\(@data{ map (lc, @{ $sth->{NAME} }) }));
Where you just take the arbitrary values from $sth->{NAME} and lower case
them with map.
>Thanks!
>Eric
>
>============================================
>
>Eric Just
>e-just-angj7XTnwNpXfO9P/[email protected]
>dictyBase Programmer
>Center for Genetic Medicine
>Northwestern University
>http://dictybase.org
>
>============================================
>
>
>_______________________________________________
>ClassDBI mailing list
>ClassDBI-Ra3b/[email protected]
>http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
============================================
Eric Just
e-just-angj7XTnwNpXfO9P/[email protected]
dictyBase Programmer
Center for Genetic Medicine
Northwestern University
http://dictybase.org
============================================
_______________________________________________
ClassDBI mailing list
ClassDBI-Ra3b/[email protected]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi