<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">########################################################################
package		# hide from PAUSE
	DBI;
# vim: ts=8:sw=4
########################################################################
#
# Copyright (c) 2002,2003  Tim Bunce  Ireland.
#
# See COPYRIGHT section in DBI.pm for usage and distribution rights.
#
########################################################################
#
# Please send patches and bug reports to
#
# Jeff Zucker &lt;jeff@vpservices.com&gt;  with cc to &lt;dbi-dev@perl.org&gt;
#
########################################################################

use strict;
use Carp;
require Symbol;

require utf8;
*utf8::is_utf8 = sub { # hack for perl 5.6
    require bytes;
    return unless defined $_[0];
    return !(length($_[0]) == bytes::length($_[0]))
} unless defined &amp;utf8::is_utf8;

$DBI::PurePerl = $ENV{DBI_PUREPERL} || 1;
$DBI::PurePerl::VERSION = "2.014286";

$DBI::neat_maxlen ||= 400;

$DBI::tfh = Symbol::gensym();
open $DBI::tfh, "&gt;&amp;STDERR" or warn "Can't dup STDERR: $!";
select( (select($DBI::tfh), $| = 1)[0] );  # autoflush

# check for weaken support, used by ChildHandles
my $HAS_WEAKEN = eval {
    require Scalar::Util;
    # this will croak() if this Scalar::Util doesn't have a working weaken().
    Scalar::Util::weaken( my $test = [] );
    1;
};

%DBI::last_method_except = map { $_=&gt;1 } qw(DESTROY _set_fbav set_err);

use constant SQL_ALL_TYPES =&gt; 0;
use constant SQL_ARRAY =&gt; 50;
use constant SQL_ARRAY_LOCATOR =&gt; 51;
use constant SQL_BIGINT =&gt; (-5);
use constant SQL_BINARY =&gt; (-2);
use constant SQL_BIT =&gt; (-7);
use constant SQL_BLOB =&gt; 30;
use constant SQL_BLOB_LOCATOR =&gt; 31;
use constant SQL_BOOLEAN =&gt; 16;
use constant SQL_CHAR =&gt; 1;
use constant SQL_CLOB =&gt; 40;
use constant SQL_CLOB_LOCATOR =&gt; 41;
use constant SQL_DATE =&gt; 9;
use constant SQL_DATETIME =&gt; 9;
use constant SQL_DECIMAL =&gt; 3;
use constant SQL_DOUBLE =&gt; 8;
use constant SQL_FLOAT =&gt; 6;
use constant SQL_GUID =&gt; (-11);
use constant SQL_INTEGER =&gt; 4;
use constant SQL_INTERVAL =&gt; 10;
use constant SQL_INTERVAL_DAY =&gt; 103;
use constant SQL_INTERVAL_DAY_TO_HOUR =&gt; 108;
use constant SQL_INTERVAL_DAY_TO_MINUTE =&gt; 109;
use constant SQL_INTERVAL_DAY_TO_SECOND =&gt; 110;
use constant SQL_INTERVAL_HOUR =&gt; 104;
use constant SQL_INTERVAL_HOUR_TO_MINUTE =&gt; 111;
use constant SQL_INTERVAL_HOUR_TO_SECOND =&gt; 112;
use constant SQL_INTERVAL_MINUTE =&gt; 105;
use constant SQL_INTERVAL_MINUTE_TO_SECOND =&gt; 113;
use constant SQL_INTERVAL_MONTH =&gt; 102;
use constant SQL_INTERVAL_SECOND =&gt; 106;
use constant SQL_INTERVAL_YEAR =&gt; 101;
use constant SQL_INTERVAL_YEAR_TO_MONTH =&gt; 107;
use constant SQL_LONGVARBINARY =&gt; (-4);
use constant SQL_LONGVARCHAR =&gt; (-1);
use constant SQL_MULTISET =&gt; 55;
use constant SQL_MULTISET_LOCATOR =&gt; 56;
use constant SQL_NUMERIC =&gt; 2;
use constant SQL_REAL =&gt; 7;
use constant SQL_REF =&gt; 20;
use constant SQL_ROW =&gt; 19;
use constant SQL_SMALLINT =&gt; 5;
use constant SQL_TIME =&gt; 10;
use constant SQL_TIMESTAMP =&gt; 11;
use constant SQL_TINYINT =&gt; (-6);
use constant SQL_TYPE_DATE =&gt; 91;
use constant SQL_TYPE_TIME =&gt; 92;
use constant SQL_TYPE_TIMESTAMP =&gt; 93;
use constant SQL_TYPE_TIMESTAMP_WITH_TIMEZONE =&gt; 95;
use constant SQL_TYPE_TIME_WITH_TIMEZONE =&gt; 94;
use constant SQL_UDT =&gt; 17;
use constant SQL_UDT_LOCATOR =&gt; 18;
use constant SQL_UNKNOWN_TYPE =&gt; 0;
use constant SQL_VARBINARY =&gt; (-3);
use constant SQL_VARCHAR =&gt; 12;
use constant SQL_WCHAR =&gt; (-8);
use constant SQL_WLONGVARCHAR =&gt; (-10);
use constant SQL_WVARCHAR =&gt; (-9);

# for Cursor types
use constant SQL_CURSOR_FORWARD_ONLY  =&gt; 0;
use constant SQL_CURSOR_KEYSET_DRIVEN =&gt; 1;
use constant SQL_CURSOR_DYNAMIC       =&gt; 2;
use constant SQL_CURSOR_STATIC        =&gt; 3;
use constant SQL_CURSOR_TYPE_DEFAULT  =&gt; SQL_CURSOR_FORWARD_ONLY;

use constant IMA_HAS_USAGE	=&gt; 0x0001; #/* check parameter usage	*/
use constant IMA_FUNC_REDIRECT	=&gt; 0x0002; #/* is $h-&gt;func(..., "method")*/
use constant IMA_KEEP_ERR	=&gt; 0x0004; #/* don't reset err &amp; errstr	*/
use constant IMA_KEEP_ERR_SUB	=&gt; 0x0008; #/*  '' if in nested call */
use constant IMA_NO_TAINT_IN   	=&gt; 0x0010; #/* don't check for tainted args*/
use constant IMA_NO_TAINT_OUT   =&gt; 0x0020; #/* don't taint results	*/
use constant IMA_COPY_UP_STMT   =&gt; 0x0040; #/* copy sth Statement to dbh */
use constant IMA_END_WORK	=&gt; 0x0080; #/* set on commit &amp; rollback	*/
use constant IMA_STUB		=&gt; 0x0100; #/* do nothing eg $dbh-&gt;connected */
use constant IMA_CLEAR_STMT     =&gt; 0x0200; #/* clear Statement before call  */
use constant IMA_UNRELATED_TO_STMT=&gt; 0x0400; #/* profile as empty Statement   */
use constant IMA_NOT_FOUND_OKAY	=&gt; 0x0800; #/* not error if not found */
use constant IMA_EXECUTE	=&gt; 0x1000; #/* do/execute: DBIcf_Executed   */
use constant IMA_SHOW_ERR_STMT  =&gt; 0x2000; #/* dbh meth relates to Statement*/
use constant IMA_HIDE_ERR_PARAMVALUES =&gt; 0x4000; #/* ParamValues are not relevant */
use constant IMA_IS_FACTORY     =&gt; 0x8000; #/* new h ie connect &amp; prepare */
use constant IMA_CLEAR_CACHED_KIDS    =&gt; 0x10000; #/* clear CachedKids before call */

use constant DBIstcf_STRICT           =&gt; 0x0001;
use constant DBIstcf_DISCARD_STRING   =&gt; 0x0002;

my %is_flag_attribute = map {$_ =&gt;1 } qw(
	Active
	AutoCommit
	ChopBlanks
	CompatMode
	Executed
	Taint
	TaintIn
	TaintOut
	InactiveDestroy
	AutoInactiveDestroy
	LongTruncOk
	MultiThread
	PrintError
	PrintWarn
	RaiseError
	RaiseWarn
	ShowErrorStatement
	Warn
);
my %is_valid_attribute = map {$_ =&gt;1 } (keys %is_flag_attribute, qw(
	ActiveKids
	Attribution
	BegunWork
	CachedKids
        Callbacks
	ChildHandles
	CursorName
	Database
	DebugDispatch
	Driver
        Err
        Errstr
	ErrCount
	FetchHashKeyName
	HandleError
	HandleSetErr
	ImplementorClass
	Kids
	LongReadLen
	NAME NAME_uc NAME_lc NAME_uc_hash NAME_lc_hash
	NULLABLE
	NUM_OF_FIELDS
	NUM_OF_PARAMS
	Name
	PRECISION
	ParamValues
	Profile
	Provider
        ReadOnly
	RootClass
	RowCacheSize
	RowsInCache
	SCALE
        State
	Statement
	TYPE
        Type
	TraceLevel
	Username
	Version
));

sub valid_attribute {
    my $attr = shift;
    return 1 if $is_valid_attribute{$attr};
    return 1 if $attr =~ m/^[a-z]/; # starts with lowercase letter
    return 0
}

my $initial_setup;
sub initial_setup {
    $initial_setup = 1;
    print $DBI::tfh  __FILE__ . " version " . $DBI::PurePerl::VERSION . "\n"
	if $DBI::dbi_debug &amp; 0xF;
    untie $DBI::err;
    untie $DBI::errstr;
    untie $DBI::state;
    untie $DBI::rows;
    #tie $DBI::lasth,  'DBI::var', '!lasth';  # special case: return boolean
}

sub  _install_method {
    my ( $caller, $method, $from, $param_hash ) = @_;
    initial_setup() unless $initial_setup;

    my ($class, $method_name) = $method =~ /^[^:]+::(.+)::(.+)$/;
    my $bitmask = $param_hash-&gt;{'O'} || 0;
    my @pre_call_frag;

    return if $method_name eq 'can';

    push @pre_call_frag, q{
        delete $h-&gt;{CachedKids};
        # ignore DESTROY for outer handle (DESTROY for inner likely to follow soon)
        return if $h_inner;
        # handle AutoInactiveDestroy and InactiveDestroy
        $h-&gt;{InactiveDestroy} = 1
            if $h-&gt;{AutoInactiveDestroy} and $$ != $h-&gt;{dbi_pp_pid};
        $h-&gt;{Active} = 0
            if $h-&gt;{InactiveDestroy};
	# copy err/errstr/state up to driver so $DBI::err etc still work
	if ($h-&gt;{err} and my $drh = $h-&gt;{Driver}) {
	    $drh-&gt;{$_} = $h-&gt;{$_} for ('err','errstr','state');
	}
    } if $method_name eq 'DESTROY';

    push @pre_call_frag, q{
	return $h-&gt;{$_[0]} if exists $h-&gt;{$_[0]};
    } if $method_name eq 'FETCH' &amp;&amp; !exists $ENV{DBI_TRACE}; # XXX ?

    push @pre_call_frag, "return;"
	if IMA_STUB &amp; $bitmask;

    push @pre_call_frag, q{
	$method_name = pop @_;
    } if IMA_FUNC_REDIRECT &amp; $bitmask;

    push @pre_call_frag, q{
	my $parent_dbh = $h-&gt;{Database};
    } if (IMA_COPY_UP_STMT|IMA_EXECUTE) &amp; $bitmask;

    push @pre_call_frag, q{
	warn "No Database set for $h on $method_name!" unless $parent_dbh; # eg proxy problems
	$parent_dbh-&gt;{Statement} = $h-&gt;{Statement} if $parent_dbh;
    } if IMA_COPY_UP_STMT &amp; $bitmask;

    push @pre_call_frag, q{
	$h-&gt;{Executed} = 1;
	$parent_dbh-&gt;{Executed} = 1 if $parent_dbh;
    } if IMA_EXECUTE &amp; $bitmask;

    push @pre_call_frag, q{
	%{ $h-&gt;{CachedKids} } = () if $h-&gt;{CachedKids};
    } if IMA_CLEAR_CACHED_KIDS &amp; $bitmask;

    if (IMA_KEEP_ERR &amp; $bitmask) {
	push @pre_call_frag, q{
	    my $keep_error = DBI::_err_hash($h);
	};
    }
    else {
	my $ke_init = (IMA_KEEP_ERR_SUB &amp; $bitmask)
		? q{= ($h-&gt;{dbi_pp_parent}-&gt;{dbi_pp_call_depth} &amp;&amp; DBI::_err_hash($h)) }
		: "";
	push @pre_call_frag, qq{
	    my \$keep_error $ke_init;
	};
	my $clear_error_code = q{
	    #warn "$method_name cleared err";
	    $h-&gt;{err}    = $DBI::err    = undef;
	    $h-&gt;{errstr} = $DBI::errstr = undef;
	    $h-&gt;{state}  = $DBI::state  = '';
	};
	$clear_error_code = q{
	    printf $DBI::tfh "    !! %s: %s CLEARED by call to }.$method_name.q{ method\n".
		    $h-&gt;{err}, $h-&gt;{err}
		if defined $h-&gt;{err} &amp;&amp; $DBI::dbi_debug &amp; 0xF;
	}. $clear_error_code
	    if exists $ENV{DBI_TRACE};
	push @pre_call_frag, ($ke_init)
		? qq{ unless (\$keep_error) { $clear_error_code }}
		: $clear_error_code
	    unless $method_name eq 'set_err';
    }

    push @pre_call_frag, q{
	my $ErrCount = $h-&gt;{ErrCount};
    };

    push @pre_call_frag, q{
        if (($DBI::dbi_debug &amp; 0xF) &gt;= 2) {
	    local $^W;
	    my $args = join " ", map { DBI::neat($_) } ($h, @_);
	    printf $DBI::tfh "    &gt; $method_name in $imp ($args) [$@]\n";
	}
    } if exists $ENV{DBI_TRACE};	# note use of 'exists'

    push @pre_call_frag, q{
        $h-&gt;{'dbi_pp_last_method'} = $method_name;
    } unless exists $DBI::last_method_except{$method_name};

    # --- post method call code fragments ---
    my @post_call_frag;

    push @post_call_frag, q{
        if (my $trace_level = ($DBI::dbi_debug &amp; 0xF)) {
	    if ($h-&gt;{err}) {
		printf $DBI::tfh "    !! ERROR: %s %s\n", $h-&gt;{err}, $h-&gt;{errstr};
	    }
	    my $ret = join " ", map { DBI::neat($_) } @ret;
	    my $msg = "    &lt; $method_name= $ret";
	    $msg = ($trace_level &gt;= 2) ? Carp::shortmess($msg) : "$msg\n";
	    print $DBI::tfh $msg;
	}
    } if exists $ENV{DBI_TRACE}; # note use of exists

    push @post_call_frag, q{
	$h-&gt;{Executed} = 0;
	if ($h-&gt;{BegunWork}) {
	    $h-&gt;{BegunWork}  = 0;
	    $h-&gt;{AutoCommit} = 1;
	}
    } if IMA_END_WORK &amp; $bitmask;

    push @post_call_frag, q{
        if ( ref $ret[0] and
            UNIVERSAL::isa($ret[0], 'DBI::_::common') and
            defined( (my $h_new = tied(%{$ret[0]})||$ret[0])-&gt;{err} )
        ) {
            # copy up info/warn to drh so PrintWarn on connect is triggered
            $h-&gt;set_err($h_new-&gt;{err}, $h_new-&gt;{errstr}, $h_new-&gt;{state})
        }
    } if IMA_IS_FACTORY &amp; $bitmask;

    push @post_call_frag, q{
        if ($keep_error) {
            $keep_error = 0
                if $h-&gt;{ErrCount} &gt; $ErrCount
                or DBI::_err_hash($h) ne $keep_error;
        }

	$DBI::err    = $h-&gt;{err};
	$DBI::errstr = $h-&gt;{errstr};
	$DBI::state  = $h-&gt;{state};

        if ( !$keep_error
	&amp;&amp; defined(my $err = $h-&gt;{err})
	&amp;&amp; ($call_depth &lt;= 1 &amp;&amp; !$h-&gt;{dbi_pp_parent}{dbi_pp_call_depth})
	) {

	    my($pe,$pw,$re,$rw,$he) = @{$h}{qw(PrintError PrintWarn RaiseError RaiseWarn HandleError)};
	    my $msg;

	    if ($err &amp;&amp; ($pe || $re || $he)	# error
	    or (!$err &amp;&amp; length($err) &amp;&amp; ($pw || $rw))	# warning
	    ) {
		my $last = ($DBI::last_method_except{$method_name})
		    ? ($h-&gt;{'dbi_pp_last_method'}||$method_name) : $method_name;
		my $errstr = $h-&gt;{errstr} || $DBI::errstr || $err || '';
		my $msg = sprintf "%s %s %s: %s", $imp, $last,
			($err eq "0") ? "warning" : "failed", $errstr;

		if ($h-&gt;{'ShowErrorStatement'} and my $Statement = $h-&gt;{Statement}) {
		    $msg .= ' [for Statement "' . $Statement;
		    if (my $ParamValues = $h-&gt;FETCH('ParamValues')) {
			$msg .= '" with ParamValues: ';
			$msg .= DBI::_concat_hash_sorted($ParamValues, "=", ", ", 1, undef);
                        $msg .= "]";
		    }
                    else {
                        $msg .= '"]';
                    }
		}
		if ($err eq "0") { # is 'warning' (not info)
		    carp $msg if $pw;
		    my $do_croak = $rw;
		    if ((my $subsub = $h-&gt;{'HandleError'}) &amp;&amp; $do_croak) {
			$do_croak = 0 if &amp;$subsub($msg,$h,$ret[0]);
		    }
		    die $msg if $do_croak;
		}
		else {
		    my $do_croak = 1;
		    if (my $subsub = $h-&gt;{'HandleError'}) {
			$do_croak = 0 if &amp;$subsub($msg,$h,$ret[0]);
		    }
		    if ($do_croak) {
			printf $DBI::tfh "    $method_name has failed ($h-&gt;{PrintError},$h-&gt;{RaiseError})\n"
				if ($DBI::dbi_debug &amp; 0xF) &gt;= 4;
			carp  $msg if $pe;
			die $msg if $h-&gt;{RaiseError};
		    }
		}
	    }
	}
    };


    my $method_code = q[
      sub {
        my $h = shift;
	my $h_inner = tied(%$h);
	$h = $h_inner if $h_inner;

        my $imp;
	if ($method_name eq 'DESTROY') {
	    # during global destruction, $h-&gt;{...} can trigger "Can't call FETCH on an undef value"
	    # implying that tied() above lied to us, so we need to use eval
	    local $@;	 # protect $@
	    $imp = eval { $h-&gt;{"ImplementorClass"} } or return; # probably global destruction
	}
	else {
	    $imp = $h-&gt;{"ImplementorClass"} or do {
                warn "Can't call $method_name method on handle $h after take_imp_data()\n"
                    if not exists $h-&gt;{Active};
                return; # or, more likely, global destruction
            };
	}

	] . join("\n", '', @pre_call_frag, '') . q[

	my $call_depth = $h-&gt;{'dbi_pp_call_depth'} + 1;
	local ($h-&gt;{'dbi_pp_call_depth'}) = $call_depth;

	my @ret;
        my $sub = $imp-&gt;can($method_name);
        if (!$sub and IMA_FUNC_REDIRECT &amp; $bitmask and $sub = $imp-&gt;can('func')) {
            push @_, $method_name;
        }
	if ($sub) {
	    (wantarray) ? (@ret = &amp;$sub($h,@_)) : (@ret = scalar &amp;$sub($h,@_));
	}
	else {
	    # XXX could try explicit fallback to $imp-&gt;can('AUTOLOAD') etc
	    # which would then let Multiplex pass PurePerl tests, but some
	    # hook into install_method may be better.
	    croak "Can't locate DBI object method \"$method_name\" via package \"$imp\""
		if ] . ((IMA_NOT_FOUND_OKAY &amp; $bitmask) ? 0 : 1) . q[;
	}

	] . join("\n", '', @post_call_frag, '') . q[

	return (wantarray) ? @ret : $ret[0];
      }
    ];
    no strict qw(refs);
    my $code_ref = eval qq{#line 1 "DBI::PurePerl $method"\n$method_code};
    warn "$@\n$method_code\n" if $@;
    die "$@\n$method_code\n" if $@;
    *$method = $code_ref;
    if (0 &amp;&amp; $method =~ /\b(connect|FETCH)\b/) { # debuging tool
	my $l=0; # show line-numbered code for method
	warn "*$method code:\n".join("\n", map { ++$l.": $_" } split/\n/,$method_code);
    }
}


sub _new_handle {
    my ($class, $parent, $attr, $imp_data, $imp_class) = @_;

    DBI-&gt;trace_msg("    New $class (for $imp_class, parent=$parent, id=".($imp_data||'').")\n")
        if $DBI::dbi_debug &gt;= 3;

    $attr-&gt;{ImplementorClass} = $imp_class
        or Carp::croak("_new_handle($class): 'ImplementorClass' attribute not given");

    # This is how we create a DBI style Object:
    # %outer gets tied to %$attr (which becomes the 'inner' handle)
    my (%outer, $i, $h);
    $i = tie    %outer, $class, $attr;  # ref to inner hash (for driver)
    $h = bless \%outer, $class;         # ref to outer hash (for application)
    # The above tie and bless may migrate down into _setup_handle()...
    # Now add magic so DBI method dispatch works
    DBI::_setup_handle($h, $imp_class, $parent, $imp_data);
    return $h unless wantarray;
    return ($h, $i);
}

sub _setup_handle {
    my($h, $imp_class, $parent, $imp_data) = @_;
    my $h_inner = tied(%$h) || $h;
    if (($DBI::dbi_debug &amp; 0xF) &gt;= 4) {
	local $^W;
	print $DBI::tfh "      _setup_handle(@_)\n";
    }
    $h_inner-&gt;{"imp_data"} = $imp_data;
    $h_inner-&gt;{"ImplementorClass"} = $imp_class;
    $h_inner-&gt;{"Kids"} = $h_inner-&gt;{"ActiveKids"} = 0;	# XXX not maintained
    if ($parent) {
	foreach (qw(
	    RaiseError PrintError RaiseWarn PrintWarn HandleError HandleSetErr
	    Warn LongTruncOk ChopBlanks AutoCommit ReadOnly
	    ShowErrorStatement FetchHashKeyName LongReadLen CompatMode
	)) {
	    $h_inner-&gt;{$_} = $parent-&gt;{$_}
		if exists $parent-&gt;{$_} &amp;&amp; !exists $h_inner-&gt;{$_};
	}
	if (ref($parent) =~ /::db$/) { # is sth
	    $h_inner-&gt;{Database} = $parent;
	    $parent-&gt;{Statement} = $h_inner-&gt;{Statement};
	    $h_inner-&gt;{NUM_OF_PARAMS} = 0;
            $h_inner-&gt;{Active} = 0; # driver sets true when there's data to fetch
	}
	elsif (ref($parent) =~ /::dr$/){ # is dbh
	    $h_inner-&gt;{Driver} = $parent;
            $h_inner-&gt;{Active} = 0;
	}
        else {
            warn "panic: ".ref($parent); # should never happen
        }
	$h_inner-&gt;{dbi_pp_parent} = $parent;

	# add to the parent's ChildHandles
	if ($HAS_WEAKEN) {
	    my $handles = $parent-&gt;{ChildHandles} ||= [];
	    push @$handles, $h;
	    Scalar::Util::weaken($handles-&gt;[-1]);
	    # purge destroyed handles occasionally
	    if (@$handles % 120 == 0) {
		@$handles = grep { defined } @$handles;
		Scalar::Util::weaken($_) for @$handles; # re-weaken after grep
	    }
	}
    }
    else {	# setting up a driver handle
        $h_inner-&gt;{Warn}		= 1;
        $h_inner-&gt;{PrintWarn}		= 1;
        $h_inner-&gt;{AutoCommit}		= 1;
        $h_inner-&gt;{TraceLevel}		= 0;
        $h_inner-&gt;{CompatMode}		= (1==0);
	$h_inner-&gt;{FetchHashKeyName}	||= 'NAME';
	$h_inner-&gt;{LongReadLen}		||= 80;
	$h_inner-&gt;{ChildHandles}        ||= [] if $HAS_WEAKEN;
	$h_inner-&gt;{Type}                ||= 'dr';
        $h_inner-&gt;{Active}              = 1;
    }
    $h_inner-&gt;{"dbi_pp_call_depth"} = 0;
    $h_inner-&gt;{"dbi_pp_pid"} = $$;
    $h_inner-&gt;{ErrCount} = 0;
}

sub constant {
    warn "constant(@_) called unexpectedly"; return undef;
}

sub trace {
    my ($h, $level, $file) = @_;
    $level = $h-&gt;parse_trace_flags($level)
	if defined $level and !DBI::looks_like_number($level);
    my $old_level = $DBI::dbi_debug;
    _set_trace_file($file) if $level;
    if (defined $level) {
	$DBI::dbi_debug = $level;
	print $DBI::tfh "    DBI $DBI::VERSION (PurePerl) "
                . "dispatch trace level set to $DBI::dbi_debug\n"
		if $DBI::dbi_debug &amp; 0xF;
    }
    _set_trace_file($file) if !$level;
    return $old_level;
}

sub _set_trace_file {
    my ($file) = @_;
    #
    #   DAA add support for filehandle inputs
    #
    # DAA required to avoid closing a prior fh trace()
    $DBI::tfh = undef unless $DBI::tfh_needs_close;

    if (ref $file eq 'GLOB') {
	$DBI::tfh = $file;
        select((select($DBI::tfh), $| = 1)[0]);
        $DBI::tfh_needs_close = 0;
        return 1;
    }
    if ($file &amp;&amp; ref \$file eq 'GLOB') {
	$DBI::tfh = *{$file}{IO};
        select((select($DBI::tfh), $| = 1)[0]);
        $DBI::tfh_needs_close = 0;
        return 1;
    }
    $DBI::tfh_needs_close = 1;
    if (!$file || $file eq 'STDERR') {
	open $DBI::tfh, "&gt;&amp;STDERR" or carp "Can't dup STDERR: $!";
    }
    elsif ($file eq 'STDOUT') {
	open $DBI::tfh, "&gt;&amp;STDOUT" or carp "Can't dup STDOUT: $!";
    }
    else {
        open $DBI::tfh, "&gt;&gt;$file" or carp "Can't open $file: $!";
    }
    select((select($DBI::tfh), $| = 1)[0]);
    return 1;
}
sub _get_imp_data {  shift-&gt;{"imp_data"}; }
sub _svdump       { }
sub dump_handle   {
    my ($h,$msg,$level) = @_;
    $msg||="dump_handle $h";
    print $DBI::tfh "$msg:\n";
    for my $attrib (sort keys %$h) {
	print $DBI::tfh "\t$attrib =&gt; ".DBI::neat($h-&gt;{$attrib})."\n";
    }
}

sub _handles {
    my $h = shift;
    my $h_inner = tied %$h;
    if ($h_inner) {	# this is okay
	return $h unless wantarray;
	return ($h, $h_inner);
    }
    # XXX this isn't okay... we have an inner handle but
    # currently have no way to get at its outer handle,
    # so we just warn and return the inner one for both...
    Carp::carp("Can't return outer handle from inner handle using DBI::PurePerl");
    return $h unless wantarray;
    return ($h,$h);
}

sub hash {
    my ($key, $type) = @_;
    my ($hash);
    if (!$type) {
        $hash = 0;
        # XXX The C version uses the "char" type, which could be either
        # signed or unsigned.  I use signed because so do the two
        # compilers on my system.
        for my $char (unpack ("c*", $key)) {
            $hash = $hash * 33 + $char;
        }
        $hash &amp;= 0x7FFFFFFF;    # limit to 31 bits
        $hash |= 0x40000000;    # set bit 31
        return -$hash;          # return negative int
    }
    elsif ($type == 1) {	# Fowler/Noll/Vo hash
        # see http://www.isthe.com/chongo/tech/comp/fnv/
        require Math::BigInt;   # feel free to reimplement w/o BigInt!
	(my $version = $Math::BigInt::VERSION || 0) =~ s/_.*//; # eg "1.70_01"
	if ($version &gt;= 1.56) {
	    $hash = Math::BigInt-&gt;new(0x811c9dc5);
	    for my $uchar (unpack ("C*", $key)) {
		# multiply by the 32 bit FNV magic prime mod 2^64
		$hash = ($hash * 0x01000193) &amp; 0xffffffff;
		# xor the bottom with the current octet
		$hash ^= $uchar;
	    }
	    # cast to int
	    return unpack "i", pack "i", $hash;
	}
	croak("DBI::PurePerl doesn't support hash type 1 without Math::BigInt &gt;= 1.56 (available on CPAN)");
    }
    else {
        croak("bad hash type $type");
    }
}

sub looks_like_number {
    my @new = ();
    for my $thing(@_) {
        if (!defined $thing or $thing eq '') {
            push @new, undef;
        }
        else {
            push @new, ($thing =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/) ? 1 : 0;
        }
    }
    return (@_ &gt;1) ? @new : $new[0];
}

sub neat {
    my $v = shift;
    return "undef" unless defined $v;
    my $quote = q{"};
    if (not utf8::is_utf8($v)) {
        return $v if (($v &amp; ~ $v) eq "0"); # is SvNIOK
        $quote = q{'};
    }
    my $maxlen = shift || $DBI::neat_maxlen;
    if ($maxlen &amp;&amp; $maxlen &lt; length($v) + 2) {
	$v = substr($v,0,$maxlen-5);
	$v .= '...';
    }
    $v =~ s/[^[:print:]]/./g;
    return "$quote$v$quote";
}

sub sql_type_cast {
    my (undef, $sql_type, $flags) = @_;

    return -1 unless defined $_[0];

    my $cast_ok = 1;

    my $evalret = eval {
        use warnings FATAL =&gt; qw(numeric);
        if ($sql_type == SQL_INTEGER) {
            my $dummy = $_[0] + 0;
            return 1;
        }
        elsif ($sql_type == SQL_DOUBLE) {
            my $dummy = $_[0] + 0.0;
            return 1;
        }
        elsif ($sql_type == SQL_NUMERIC) {
            my $dummy = $_[0] + 0.0;
            return 1;
        }
        else {
            return -2;
        }
    } or $^W &amp;&amp; warn $@; # XXX warnings::warnif("numeric", $@) ?

    return $evalret if defined($evalret) &amp;&amp; ($evalret == -2);
    $cast_ok = 0 unless $evalret;

    # DBIstcf_DISCARD_STRING not supported for PurePerl currently

    return 2 if $cast_ok;
    return 0 if $flags &amp; DBIstcf_STRICT;
    return 1;
}

sub dbi_time {
    return time();
}

sub DBI::st::TIEHASH { bless $_[1] =&gt; $_[0] };

sub _concat_hash_sorted {
    my ( $hash_ref, $kv_separator, $pair_separator, $use_neat, $num_sort ) = @_;
    # $num_sort: 0=lexical, 1=numeric, undef=try to guess

    return undef unless defined $hash_ref;
    die "hash is not a hash reference" unless ref $hash_ref eq 'HASH';
    my $keys = _get_sorted_hash_keys($hash_ref, $num_sort);
    my $string = '';
    for my $key (@$keys) {
        $string .= $pair_separator if length $string &gt; 0;
        my $value = $hash_ref-&gt;{$key};
        if ($use_neat) {
            $value = DBI::neat($value, 0);
        }
        else {
            $value = (defined $value) ? "'$value'" : 'undef';
        }
        $string .= $key . $kv_separator . $value;
    }
    return $string;
}

sub _get_sorted_hash_keys {
    my ($hash_ref, $num_sort) = @_;
    if (not defined $num_sort) {
        my $sort_guess = 1;
        $sort_guess = (not looks_like_number($_)) ? 0 : $sort_guess
            for keys %$hash_ref;
        $num_sort = $sort_guess;
    }

    my @keys = keys %$hash_ref;
    no warnings 'numeric';
    my @sorted = ($num_sort)
        ? sort { $a &lt;=&gt; $b or $a cmp $b } @keys
        : sort    @keys;
    return \@sorted;
}

sub _err_hash {
    return 1 unless defined $_[0]-&gt;{err};
    return "$_[0]-&gt;{err} $_[0]-&gt;{errstr}"
}


package
	DBI::var;

sub FETCH {
    my($key)=shift;
    return $DBI::err     if $$key eq '*err';
    return $DBI::errstr  if $$key eq '&amp;errstr';
    Carp::confess("FETCH $key not supported when using DBI::PurePerl");
}

package
	DBD::_::common;

sub swap_inner_handle {
    my ($h1, $h2) = @_;
    # can't make this work till we can get the outer handle from the inner one
    # probably via a WeakRef
    return $h1-&gt;set_err($DBI::stderr, "swap_inner_handle not currently supported by DBI::PurePerl");
}

sub trace {	# XXX should set per-handle level, not global
    my ($h, $level, $file) = @_;
    $level = $h-&gt;parse_trace_flags($level)
	if defined $level and !DBI::looks_like_number($level);
    my $old_level = $DBI::dbi_debug;
    DBI::_set_trace_file($file) if defined $file;
    if (defined $level) {
	$DBI::dbi_debug = $level;
	if ($DBI::dbi_debug) {
	    printf $DBI::tfh
		"    %s trace level set to %d in DBI $DBI::VERSION (PurePerl)\n",
		$h, $DBI::dbi_debug;
	    print $DBI::tfh "    Full trace not available because DBI_TRACE is not in environment\n"
		unless exists $ENV{DBI_TRACE};
	}
    }
    return $old_level;
}
*debug = \&amp;trace; *debug = \&amp;trace; # twice to avoid typo warning

sub FETCH {
    my($h,$key)= @_;
    my $v = $h-&gt;{$key};
    #warn ((exists $h-&gt;{$key}) ? "$key=$v\n" : "$key NONEXISTANT\n");
    return $v if defined $v;
    if ($key =~ /^NAME_.c$/) {
        my $cols = $h-&gt;FETCH('NAME');
        return undef unless $cols;
        my @lcols = map { lc $_ } @$cols;
        $h-&gt;{NAME_lc} = \@lcols;
        my @ucols = map { uc $_ } @$cols;
        $h-&gt;{NAME_uc} = \@ucols;
        return $h-&gt;FETCH($key);
    }
    if ($key =~ /^NAME.*_hash$/) {
        my $i=0;
        for my $c(@{$h-&gt;FETCH('NAME')||[]}) {
            $h-&gt;{'NAME_hash'}-&gt;{$c}    = $i;
            $h-&gt;{'NAME_lc_hash'}-&gt;{"\L$c"} = $i;
            $h-&gt;{'NAME_uc_hash'}-&gt;{"\U$c"} = $i;
            $i++;
        }
        return $h-&gt;{$key};
    }
    if (!defined $v &amp;&amp; !exists $h-&gt;{$key}) {
	return ($h-&gt;FETCH('TaintIn') &amp;&amp; $h-&gt;FETCH('TaintOut')) if $key eq'Taint';
	return (1==0) if $is_flag_attribute{$key}; # return perl-style sv_no, not undef
	return $DBI::dbi_debug if $key eq 'TraceLevel';
        return [] if $key eq 'ChildHandles' &amp;&amp; $HAS_WEAKEN;
        if ($key eq 'Type') {
            return "dr" if $h-&gt;isa('DBI::dr');
            return "db" if $h-&gt;isa('DBI::db');
            return "st" if $h-&gt;isa('DBI::st');
            Carp::carp( sprintf "Can't determine Type for %s",$h );
        }
	if (!$is_valid_attribute{$key} and $key =~ m/^[A-Z]/) {
	    local $^W; # hide undef warnings
	    Carp::carp( sprintf "Can't get %s-&gt;{%s}: unrecognised attribute (@{[ %$h ]})",$h,$key )
	}
    }
    return $v;
}
sub STORE {
    my ($h,$key,$value) = @_;
    if ($key eq 'AutoCommit') {
        Carp::croak("DBD driver has not implemented the AutoCommit attribute")
	    unless $value == -900 || $value == -901;
	$value = ($value == -901);
    }
    elsif ($key =~ /^Taint/ ) {
	Carp::croak(sprintf "Can't set %s-&gt;{%s}: Taint mode not supported by DBI::PurePerl",$h,$key)
		if $value;
    }
    elsif ($key eq 'TraceLevel') {
	$h-&gt;trace($value);
	return 1;
    }
    elsif ($key eq 'NUM_OF_FIELDS') {
        $h-&gt;{$key} = $value;
        if ($value) {
            my $fbav = DBD::_::st::dbih_setup_fbav($h);
            @$fbav = (undef) x $value if @$fbav != $value;
        }
	return 1;
    }
    elsif (!$is_valid_attribute{$key} &amp;&amp; $key =~ /^[A-Z]/ &amp;&amp; !exists $h-&gt;{$key}) {
       Carp::carp(sprintf "Can't set %s-&gt;{%s}: unrecognised attribute or invalid value %s",
	    $h,$key,$value);
    }
    $h-&gt;{$key} = $is_flag_attribute{$key} ? !!$value : $value;
    Scalar::Util::weaken($h-&gt;{$key}) if $key eq 'CachedKids';
    return 1;
}
sub DELETE {
    my ($h, $key) = @_;
    return $h-&gt;FETCH($key) unless $key =~ /^private_/;
    return delete $h-&gt;{$key};
}
sub err    { return shift-&gt;{err}    }
sub errstr { return shift-&gt;{errstr} }
sub state  { return shift-&gt;{state}  }
sub set_err {
    my ($h, $errnum,$msg,$state, $method, $rv) = @_;
    $h = tied(%$h) || $h;

    if (my $hss = $h-&gt;{HandleSetErr}) {
	return if $hss-&gt;($h, $errnum, $msg, $state, $method);
    }

    if (!defined $errnum) {
	$h-&gt;{err}    = $DBI::err    = undef;
	$h-&gt;{errstr} = $DBI::errstr = undef;
	$h-&gt;{state}  = $DBI::state  = '';
        return;
    }

    if ($h-&gt;{errstr}) {
	$h-&gt;{errstr} .= sprintf " [err was %s now %s]", $h-&gt;{err}, $errnum
		if $h-&gt;{err} &amp;&amp; $errnum &amp;&amp; $h-&gt;{err} ne $errnum;
	$h-&gt;{errstr} .= sprintf " [state was %s now %s]", $h-&gt;{state}, $state
		if $h-&gt;{state} and $h-&gt;{state} ne "S1000" &amp;&amp; $state &amp;&amp; $h-&gt;{state} ne $state;
	$h-&gt;{errstr} .= "\n$msg" if $h-&gt;{errstr} ne $msg;
	$DBI::errstr = $h-&gt;{errstr};
    }
    else {
	$h-&gt;{errstr} = $DBI::errstr = $msg;
    }

    # assign if higher priority: err &gt; "0" &gt; "" &gt; undef
    my $err_changed;
    if ($errnum			# new error: so assign
	or !defined $h-&gt;{err}	# no existing warn/info: so assign
           # new warn ("0" len 1) &gt; info ("" len 0): so assign
	or defined $errnum &amp;&amp; length($errnum) &gt; length($h-&gt;{err})
    ) {
        $h-&gt;{err} = $DBI::err = $errnum;
	++$h-&gt;{ErrCount} if $errnum;
	++$err_changed;
    }

    if ($err_changed) {
	$state ||= "S1000" if $DBI::err;
	$h-&gt;{state} = $DBI::state = ($state eq "00000") ? "" : $state
	    if $state;
    }

    if (my $p = $h-&gt;{Database}) { # just sth-&gt;dbh, not dbh-&gt;drh (see ::db::DESTROY)
	$p-&gt;{err}    = $DBI::err;
	$p-&gt;{errstr} = $DBI::errstr;
	$p-&gt;{state}  = $DBI::state;
    }

    $h-&gt;{'dbi_pp_last_method'} = $method;
    return $rv; # usually undef
}
sub trace_msg {
    my ($h, $msg, $minlevel)=@_;
    $minlevel = 1 unless defined $minlevel;
    return unless $minlevel &lt;= ($DBI::dbi_debug &amp; 0xF);
    print $DBI::tfh $msg;
    return 1;
}
sub private_data {
    warn "private_data @_";
}
sub take_imp_data {
    my $dbh = shift;
    # A reasonable default implementation based on the one in DBI.xs.
    # Typically a pure-perl driver would have their own take_imp_data method
    # that would delete all but the essential items in the hash before ending with:
    #      return $dbh-&gt;SUPER::take_imp_data();
    # Of course it's useless if the driver doesn't also implement support for
    # the dbi_imp_data attribute to the connect() method.
    require Storable;
    croak("Can't take_imp_data from handle that's not Active")
        unless $dbh-&gt;{Active};
    for my $sth (@{ $dbh-&gt;{ChildHandles} || [] }) {
        next unless $sth;
        $sth-&gt;finish if $sth-&gt;{Active};
        bless $sth, 'DBI::zombie';
    }
    delete $dbh-&gt;{$_} for (keys %is_valid_attribute);
    delete $dbh-&gt;{$_} for grep { m/^dbi_/ } keys %$dbh;
    # warn "@{[ %$dbh ]}";
    local $Storable::forgive_me = 1; # in case there are some CODE refs
    my $imp_data = Storable::freeze($dbh);
    # XXX um, should probably untie here - need to check dispatch behaviour
    return $imp_data;
}
sub rows {
    return -1; # always returns -1 here, see DBD::_::st::rows below
}
sub DESTROY {
}

package
	DBD::_::dr;

sub dbixs_revision {
    return 0;
}

package
	DBD::_::db;

sub connected {
}


package
	DBD::_::st;

sub fetchrow_arrayref	{
    my $h = shift;
    # if we're here then driver hasn't implemented fetch/fetchrow_arrayref
    # so we assume they've implemented fetchrow_array and call that instead
    my @row = $h-&gt;fetchrow_array or return;
    return $h-&gt;_set_fbav(\@row);
}
# twice to avoid typo warning
*fetch = \&amp;fetchrow_arrayref;  *fetch = \&amp;fetchrow_arrayref;

sub fetchrow_array	{
    my $h = shift;
    # if we're here then driver hasn't implemented fetchrow_array
    # so we assume they've implemented fetch/fetchrow_arrayref
    my $row = $h-&gt;fetch or return;
    return @$row;
}
*fetchrow = \&amp;fetchrow_array; *fetchrow = \&amp;fetchrow_array;

sub fetchrow_hashref {
    my $h         = shift;
    my $row       = $h-&gt;fetch or return;
    my $FetchCase = shift;
    my $FetchHashKeyName = $FetchCase || $h-&gt;{'FetchHashKeyName'} || 'NAME';
    my $FetchHashKeys    = $h-&gt;FETCH($FetchHashKeyName);
    my %rowhash;
    @rowhash{ @$FetchHashKeys } = @$row;
    return \%rowhash;
}
sub dbih_setup_fbav {
    my $h = shift;
    return $h-&gt;{'_fbav'} || do {
        $DBI::rows = $h-&gt;{'_rows'} = 0;
        my $fields = $h-&gt;{'NUM_OF_FIELDS'}
                  or DBI::croak("NUM_OF_FIELDS not set");
        my @row = (undef) x $fields;
        \@row;
    };
}
sub _get_fbav {
    my $h = shift;
    my $av = $h-&gt;{'_fbav'} ||= dbih_setup_fbav($h);
    $DBI::rows = ++$h-&gt;{'_rows'};
    return $av;
}
sub _set_fbav {
    my $h = shift;
    my $fbav = $h-&gt;{'_fbav'};
    if ($fbav) {
	$DBI::rows = ++$h-&gt;{'_rows'};
    }
    else {
	$fbav = $h-&gt;_get_fbav;
    }
    my $row = shift;
    if (my $bc = $h-&gt;{'_bound_cols'}) {
        for my $i (0..@$row-1) {
            my $bound = $bc-&gt;[$i];
            $fbav-&gt;[$i] = ($bound) ? ($$bound = $row-&gt;[$i]) : $row-&gt;[$i];
        }
    }
    else {
        @$fbav = @$row;
    }
    return $fbav;
}
sub bind_col {
    my ($h, $col, $value_ref,$from_bind_columns) = @_;
    my $fbav = $h-&gt;{'_fbav'} ||= dbih_setup_fbav($h); # from _get_fbav()
    my $num_of_fields = @$fbav;
    DBI::croak("bind_col: column $col is not a valid column (1..$num_of_fields)")
        if $col &lt; 1 or $col &gt; $num_of_fields;
    return 1 if not defined $value_ref; # ie caller is just trying to set TYPE
    DBI::croak("bind_col($col,$value_ref) needs a reference to a scalar")
	unless ref $value_ref eq 'SCALAR';
    $h-&gt;{'_bound_cols'}-&gt;[$col-1] = $value_ref;
    return 1;
}
sub finish {
    my $h = shift;
    $h-&gt;{'_fbav'} = undef;
    $h-&gt;{'Active'} = 0;
    return 1;
}
sub rows {
    my $h = shift;
    my $rows = $h-&gt;{'_rows'};
    return -1 unless defined $rows;
    return $rows;
}

1;
__END__

=pod

=head1 NAME

DBI::PurePerl -- a DBI emulation using pure perl (no C/XS compilation required)

=head1 SYNOPSIS

 BEGIN { $ENV{DBI_PUREPERL} = 2 }
 use DBI;

=head1 DESCRIPTION

This is a pure perl emulation of the DBI internals.  In almost all
cases you will be better off using standard DBI since the portions
of the standard version written in C make it *much* faster.

However, if you are in a situation where it isn't possible to install
a compiled version of standard DBI, and you're using pure-perl DBD
drivers, then this module allows you to use most common features
of DBI without needing any changes in your scripts.

=head1 EXPERIMENTAL STATUS

DBI::PurePerl is new so please treat it as experimental pending
more extensive testing.  So far it has passed all tests with DBD::CSV,
DBD::AnyData, DBD::XBase, DBD::Sprite, DBD::mysqlPP.  Please send
bug reports to Jeff Zucker at &lt;jeff@vpservices.com&gt; with a cc to
&lt;dbi-dev@perl.org&gt;.

=head1 USAGE

The usage is the same as for standard DBI with the exception
that you need to set the environment variable DBI_PUREPERL if
you want to use the PurePerl version.

 DBI_PUREPERL == 0 (the default) Always use compiled DBI, die
                   if it isn't properly compiled &amp; installed

 DBI_PUREPERL == 1 Use compiled DBI if it is properly compiled
                   &amp; installed, otherwise use PurePerl

 DBI_PUREPERL == 2 Always use PurePerl

You may set the environment variable in your shell (e.g. with
set or setenv or export, etc) or else set it in your script like
this:

 BEGIN { $ENV{DBI_PUREPERL}=2 }

before you C&lt;use DBI;&gt;.

=head1 INSTALLATION

In most situations simply install DBI (see the DBI pod for details).

In the situation in which you can not install DBI itself, you
may manually copy DBI.pm and PurePerl.pm into the appropriate
directories.

For example:

 cp DBI.pm      /usr/jdoe/mylibs/.
 cp PurePerl.pm /usr/jdoe/mylibs/DBI/.

Then add this to the top of scripts:

 BEGIN {
   $ENV{DBI_PUREPERL} = 1;	# or =2
   unshift @INC, '/usr/jdoe/mylibs';
 }

(Or should we perhaps patch Makefile.PL so that if DBI_PUREPERL
is set to 2 prior to make, the normal compile process is skipped
and the files are installed automatically?)

=head1 DIFFERENCES BETWEEN DBI AND DBI::PurePerl

=head2 Attributes

Boolean attributes still return boolean values but the actual values
used may be different, i.e., 0 or undef instead of an empty string.

Some handle attributes are either not supported or have very limited
functionality:

  ActiveKids
  InactiveDestroy
  AutoInactiveDestroy
  Kids
  Taint
  TaintIn
  TaintOut

(and probably others)

=head2 Tracing

Trace functionality is more limited and the code to handle tracing is
only embedded into DBI:PurePerl if the DBI_TRACE environment variable
is defined.  To enable total tracing you can set the DBI_TRACE
environment variable as usual.  But to enable individual handle
tracing using the trace() method you also need to set the DBI_TRACE
environment variable, but set it to 0.

=head2 Parameter Usage Checking

The DBI does some basic parameter count checking on method calls.
DBI::PurePerl doesn't.

=head2 Speed

DBI::PurePerl is slower. Although, with some drivers in some
contexts this may not be very significant for you.

By way of example... the test.pl script in the DBI source
distribution has a simple benchmark that just does:

    my $null_dbh = DBI-&gt;connect('dbi:NullP:','','');
    my $i = 10_000;
    $null_dbh-&gt;prepare('') while $i--;

In other words just prepares a statement, creating and destroying
a statement handle, over and over again.  Using the real DBI this
runs at ~4550 handles per second whereas DBI::PurePerl manages
~2800 per second on the same machine (not too bad really).

=head2 May not fully support hash()

If you want to use type 1 hash, i.e., C&lt;hash($string,1)&gt; with
DBI::PurePerl, you'll need version 1.56 or higher of Math::BigInt
(available on CPAN).

=head2 Doesn't support preparse()

The DBI-&gt;preparse() method isn't supported in DBI::PurePerl.

=head2 Doesn't support DBD::Proxy

There's a subtle problem somewhere I've not been able to identify.
DBI::ProxyServer seem to work fine with DBI::PurePerl but DBD::Proxy
does not work 100% (which is sad because that would be far more useful :)
Try re-enabling t/80proxy.t for DBI::PurePerl to see if the problem
that remains will affect you're usage.

=head2 Others

  can() - doesn't have any special behaviour

Please let us know if you find any other differences between DBI
and DBI::PurePerl.

=head1 AUTHORS

Tim Bunce and Jeff Zucker.

Tim provided the direction and basis for the code.  The original
idea for the module and most of the brute force porting from C to
Perl was by Jeff. Tim then reworked some core parts to boost the
performance and accuracy of the emulation. Thanks also to Randal
Schwartz and John Tobey for patches.

=head1 COPYRIGHT

Copyright (c) 2002  Tim Bunce  Ireland.

See COPYRIGHT section in DBI.pm for usage and distribution rights.

=cut
</pre></body></html>