Subject: | Can't locate object method "autoflush" via package "IO::File" at I:/strawberry/perl/site/lib/Log/Any/Adapter/File.pm line 19. |
This is strawberry Perl on a Win64 machine.
When I run:
use strict;
use warnings;
use Log::Any::Adapter ('File', 'x.log');
use DBIx::LogAny;
my $h = DBIx::LogAny->connect("dbi:ODBC:asus2", "sa", "easysoft",
);
$h->do("drop table fred");
$h->do(q/create table fred (a int)/);
my $s = $h->prepare(q/insert into fred values(?)/);
$s->execute(1);
I get the error in the subject.
I changed Log::Any::Adapter::File to include IO::File and it fixed it.
Not sure if this is the right solution but it works:
package Log::Any::Adapter::File;
BEGIN {
$Log::Any::Adapter::File::VERSION = '0.10';
}
use strict;
use warnings;
use base qw(Log::Any::Adapter::FileScreenBase IO::File); #<--- here
Martin
--
Martin J. Evans
Wetherby, UK