DBI::Anydata - Can't call method "func"



Code is more or less right out of the POD. Running ActivePerl on an XP
system. Tried using [<DATA>] and __END__ with the same result.

use DBI;
eval {
my $dbh=DBI->connect('dbi:AnyData(RaiseError=>1):')
};

1;
print "line 7 value of \@: $@\n";
eval {
$dbh->func( 'test', 'ARRAY',
[
['id','phrase'],
[1,'foo'],
[2,'bar']
],
'ad_import')
};

1;
print "line 19 value of \@: $@\n";

eval {
print $dbh->selectcol_arrayref(qq{
SELECT phrase FROM test WHERE id = 2
})->[0]
};

1;
print "line 28 value of \@: $@\n";
1;

**************************************

line 7 value of @:

line 19 value of @: Can't call method "func" on an undefined value at
C:\scripts\printers\rt.pl line 9.

line 28 value of @: Can't call method "selectcol_arrayref" on an
undefined value at C:\scripts\printers\rt.pl line 22.

.



Relevant Pages