Subject: | [PATCH] set_up_table and FetchHashKeyName |
When FetchHashKeyName != 'NAME_lc', set_up_table() breaks, since it
assumes all keys are lowercase. I haven't found any more elegant way of
solving this, other that lower-casing all the keys in the result hash,
as per attached patch.
/Lars
--- /usr/local/lib/perl5/site_perl/5.8.1/Class/DBI/mysql.pm.orig Wed Oct 22 14:36:40 2003
+++ /usr/local/lib/perl5/site_perl/5.8.1/Class/DBI/mysql.pm Wed Oct 22 15:12:55 2003
@@ -62,6 +62,7 @@
(my $sth = $class->sql_desc_table)->execute;
my (@cols, @pri);
while (my $hash = $sth->fetch_hash) {
+ map {$hash->{lc $_} = delete $hash->{$_}} keys %$hash; # handle uc/lc
my ($col) = $hash->{field} =~ /(\w+)/;
push @cols, $col;
push @pri, $col if $hash->{key} eq "PRI";