Subject: | Can't locate object method "staleness" (used with IPC::PubSub in Win32 via ActivePerl/ActiveState PDK) |
I get this error at some random time after I have been using IPC::PubSub
with DBM::Deep:
Can't locate object method "staleness" via package
"DBM::Deep::Engine::Sector::Scalar" at DBM/Deep/Engine.pm Line 130
This link shows the same error in their testing:
http://ppm4.activestate.com/MSWin32-x86/5.8/818/R/RK/RKINYON/Presto-0.01.d/log-20081103T073721.txt
I'm using ActiveState PDK to create a distributable EXE file for
Windows. This error occurred on Windows XP Professional.
I'm not doing anything fancy with the code or using "not recommended to
be used" API functions as listed in the IPC::PubSub POD.
This error happens in both files, but not at the same time. There are
no other files using this DBM::Deep db file.
Here is a snippet of the code:
***** In FILE1.pl: (distributed as a tooltray app using PDK PerlTray)
use IPC::PubSub;
use IPC::PubSub::Cache::DBM_Deep; # necessary for PDK
use Data::Dumper;
my $bus = IPC::PubSub->new(DBM_Deep => $ENV{TEMP}.'/mytest-ipc.db');
my $bussub = $bus->new_subscriber('user-client');
my $buspub = $bus->new_publisher('service-client');
.. snip ..
my @msg = $bussub->get;
foreach my $message (@msg)
{
print Dumper($message);
$buspub->msg("clienttray: received action: ".$message->{action});
}
***** In FILE2.pl: (distributed as a console app using PDK PerlApp)
use IPC::PubSub;
use IPC::PubSub::Cache::DBM_Deep; # necessary for PDK
my $bus = IPC::PubSub->new(DBM_Deep => $ENV{TEMP}.'/mytest-ipc.db');
my $bussub = $bus->new_subscriber('service-client');
my $buspub = $bus->new_publisher('user-client');
while (1)
{
print ".\n";
my @msg = $bussub->get;
foreach my $message (@msg)
{
print ">> $message\n" if $message;
}
if (int(rand() * 10) == 5)
{
$buspub->msg({
action => 'notify',
title => 'Notification: '.localtime,
message => 'This is just a test.',
icon => 'info',
timeout => 5,
});
print "*\n";
}
sleep(1);
}