On Monday, November 25, 2002, at 03:20  PM, Tim Bunce wrote:

I'll look into this.
I'm pretty sure that it's a difference between 5.6.x and 5.8.x. The Exception::Class::DBI tests have always succeeded since I added a test for the different versions of Perl. Still very strange, though.

No. Attribute changes only affect the handle they were applied to
and any children created later from that handle. They don't affect
the parent handle.
Oh, so the attributes on the $drh object never change, then, eh?

Statement handles don't have kids, but the DBI ought to recognize
the attribute name.  Fixed.
So it's just for $dbh objects, then?

(And should there be a section for $drh objects, BTW?).
Using a $drh directly is discouraged (partly because it's likely
to break if you use the proxy).
Ah, crap. Is a $drh object passed to any HandleError subrefs, yet? Wait, that's what my last patch does, isn't it? Exception::Class::DBI is getting a bunch of info from the handle passed to it -- all of the attributes that are "common to all handles". Is this wrong, then?

http://search.cpan.org/src/DWHEELER/Exception-Class-DBI-0.02/lib/ Exception/Class/DBI.pm

* Lines 135-141. The PRECISION and SCALE attributes return undef here,
rather than array references. It seems to me that either they should
return empty array references or should be documented to return undef
when the DBD hasn't implemented them (which I assume is the case with
ExampleP).
Yeap. It's kind of a general presumption that a valid but unsupported
attribute returns undef. I'd be happy to clarify any general docs
but I'd rather not repeat that statement for each attribute.
Okay, that makes sense.

Should *all* of the attributes
defined in the documentation have defaults?
In as much as they should be recognized (so no error) and probably return undef.
Okay.

* Running these test under PurePerl DBI fails hard. The principal issue
seems to be that where DBI returns a null string C<''> as the false
value for many attributes, PurePerl returns C<undef>, instead. If it
means to follow the general Perl pattern, it should probably return
null strings like DBI does.
I've changed the tests to just do ok(foo) or ok(!foo).
But I've also cleaned up a few related PurePerl internals.
So it's consistent between the two, now?

I think I've got them all nailed now, including those spotted by new
tests (there's 125 attribue tests now :)

Many thanks for doing this David.
Sure, happy to help.

Regards,

David

--
David Wheeler                                     AIM: dwTheory
[EMAIL PROTECTED]                                 ICQ: 15726394
http://david.wheeler.net/                      Yahoo!: dew7e
                                               Jabber: [EMAIL PROTECTED]

Reply via email to