Groovy!
BTW: I think I've uncovered another little delta between DBI and PurePerl:
The $dbh->{Name} attribute in DBI holds the DSN of the connection,
whereas in PurePerl its being assigned the name of the driver (as
$drh->{Name}
does for regular DBI)...maybe its time to consider an alternate naming to
differentiate the 2 uses ?.
Here's the change at line 288:
# $h_inner->{$_} = $parent->{$_} foreach (qw(Name Version
Attribution));
$h_inner->{$_} = $parent->{$_} foreach (qw(Version Attribution));
Will this be a problem for drivers which aren't explicitly setting
$dbh->{Name} to the
DSN, as DBI does in the generic case ?
After this, my driver test module (for DBD::Teradata) ran without a hitch.
Performance is about the same between
the 2 versions, but I'm running on the same platform as the DBMS, I'll try
from
Mac OS X to my DBMS on Win2K soon. Plus its a pure Perl driver, so using a
pure Perl switch doesn't add much as a percentage of pathlength in this
case.
BTW: what's needed to get the array binding i/f patched in ? Just the
interface
declarations from regular DBI ? Or do the default implementations need to
be copied over as well ?
Many thanks...I hope to try and get this running on my Zaurus soon...and
with DBD::Chart too.
Dean Arnold
> Dean Arnold wrote:
>
> > (Not certain which list this belongs on, so I'm sending to both)
> >
> > I've been testing my drivers with PurePerl, and ran into a little
> > problem I'm hoping someone can enlighten me about:
> >
> > My test script runs splendidly until it calls
> > $drh->func(...'MyDriverSpecificFunction');
>
>
> Hmm, a driver handle. Whoops, I think I inadvertently limited func()
> calls to database handles, see fix below.
>
>
> > Is the $handle->func() capability unavailable in PurePerl ?
>
>
> It's available for database handles. All the $dbh->func() methods I've
> tried with the $DBD::CSV and DBD::AnyData have worked.
>
> To make it available to other handles, comment out lines 175, and 176 in
> DBI::PurePerl and add the line as shown below:
>
> 175 # $imp =~ s/^(.*)::([^:]+)$/$1/;
> 176 # $method_name = $imp.'::db::'. pop @_;
> $method_name = $imp . '::' . pop @_;
>
> --
> Jeff
>