Yep it worked.  Here's a new patch:

--- ExampleP.pm.orig    2003-09-11 07:41:25.000000000 -0400
+++ ExampleP.pm 2003-09-11 22:28:13.000000000 -0400
@@ -358,10 +358,10 @@
        # either return dynamic values that cannot be precomputed
        # or fetch and cache attribute values too expensive to prefetch.
        if ($attrib eq 'TYPE'){
-           return [ @DBD::ExampleP::stattypes{ @{ $sth->{NAME_lc} } } ];
+           return [ @DBD::ExampleP::stattypes{ @{ $sth->FETCH(q{NAME_lc}) } } ];
        }
        elsif ($attrib eq 'PRECISION'){
-           return [ @DBD::ExampleP::statprec{  @{ $sth->{NAME_lc} } } ];
+           return [ @DBD::ExampleP::statprec{  @{ $sth->FETCH(q{NAME_lc}) } } ];
        }
        elsif ($attrib eq 'ParamValues') {
            my $dbd_param = $sth->{dbd_param} || [];

On Thu, Sep 11, 2003 at 05:11:32PM +0100, Tim Bunce wrote:
> Thanks. But when/why is $sth->{NAME_lc} undefined?
> I suspect the right fix is to change $sth->{NAME_lc}
> to $sth->FETCH('NAME_lc') to trigger the magic that
> handled the _lc suffix. Could you try that for me?
> 
> Tim.
> 
> On Thu, Sep 11, 2003 at 08:15:28AM -0400, Thomas A. Lowery wrote:
> > Tim,
> > Here's a minor patch for DBD::ExampleP to fix:
> >     https://rt.cpan.org/Ticket/Display.html?id=2192
> > Use of uninitialized value in array dereference at
> > /opt/perl_5.8.0/lib/sun4-solaris-thread-multi/DBD/ExampleP.pm line 360.
> > 
> > 
> > Tom
> > 
> > --- ExampleP.pm.orig        2003-09-11 07:41:25.000000000 -0400
> > +++ ExampleP.pm     2003-07-29 20:53:22.000000000 -0400
> > @@ -357,10 +357,15 @@
> >     # In reality this would interrogate the database engine to
> >     # either return dynamic values that cannot be precomputed
> >     # or fetch and cache attribute values too expensive to prefetch.
> > +
> >     if ($attrib eq 'TYPE'){
> > +       return [] unless (defined $sth->{NAME_lc}
> > +           and scalar @{$sth->{NAME_lc}});
> >         return [ @DBD::ExampleP::stattypes{ @{ $sth->{NAME_lc} } } ];
> >     }
> >     elsif ($attrib eq 'PRECISION'){
> > +       return [] unless (defined $sth->{NAME_lc}
> > +           and scalar @{$sth->{NAME_lc}});
> >         return [ @DBD::ExampleP::statprec{  @{ $sth->{NAME_lc} } } ];
> >     }
> >     elsif ($attrib eq 'ParamValues') {

Reply via email to