Is this a bug or something else? Can someone please give me some direction about where to look or go to solve this problem?

The error message is:
Can't locate object method "TIEHASH" via package "DBI::st" at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 1053.


I managed to reproduce the error in this simple test program:
#!/usr/bin/perl -w
use strict;
use integer;

use DBI;
use Safe;

our $dbh = DBI->connect("dbi:Pg:dbname=mydb", 'username', 'password');
$dbh->{AutoCommit} = 0; # Don't commit changes to the db until we're done
$dbh->{RaiseError} = 1; # die if there's a db error (thereby preventing us from writing partial data to the db)


our $safe = new Safe;
$safe->share_from('main',['$dbh']);

our $safecode = <<END;
\$dbh->prepare("SELECT * FROM mytable");
END

$safe->reval($safecode,1);
die $@ if $@;

exit;


Thanks in advance,


Peter



Reply via email to