[Israel.pm] DBD::RAM

Chanan Berler chananb at centerity.com
Tue Sep 29 02:00:57 PDT 2009


Hi All,

Has anyone worked with DBD::RAM moduel found on cpan ?
I tried this code, found on the cpan web:
And get these error: Can't locate object method "STORE" via package
"DBD::File::db" at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/DBD/File.pm line 362.

#!/usr/bin/perl
use warnings;
use strict;
use DBI;

my $dbh_ram = DBI->connect('dbi:RAM:','','',{RaiseError=>1});

my $dbh_mysql =
DBI->connect('dbi:mysql:monitor','nagios','nagios',{RaiseError=>1});
my $sth_mysql = $dbh_mysql->prepare("select * from host");
$sth_mysql->execute();

$dbh_ram->func({
     data_type   => 'DBI',
     data_source => $sth_mysql,
 },'import' );
$dbh_mysql->disconnect;

print $dbh_ram->selectcol_arrayref(qq[
select host_name from host])->[0];



Q: can anyone help with this error ?
Thanks
CHanan



More information about the Perl mailing list