The t/dbi.t tests fail against oracle database.
One cause is that oracle always returns field names in uppercase.
The other cause is the use of Char(nnn) datatype which will not
match field values with padded blanks.

The 2nd cause can be easily fixed by using varchar(nnn) instead of 
char(nnn) in dbi.t.

As for the first cause, I looked at the tt2 docs and it is recommended
that lowercase names are preferred. So we have 2 options. One is to
only have lowercase names returned. The other is to also have
uppercase names returned so that those familiar with the oracle database
will not get surprised. Here is a patch to do the later:

$ cd /usr/local/lib/perl5/site_perl/5.6.1/Template/Plugin
$ diff -c DBI.pm.orig DBI.pm
*** DBI.pm.orig Fri Jun 15 10:30:56 2001
--- DBI.pm      Tue Jun 19 08:21:51 2001
***************
*** 422,427 ****
--- 422,428 ----
        $sth->finish();
        return;
      };
+     $data->{lc $_}=$data->{$_} for keys %$data;
      $self->{ NEXT } = $data;
      return;
  }

With these 2 changes, all the cases in t/dbi.t passed against oracle
database without any problems.

What do you think about making these changes in tt2?

Richard 


Reply via email to