Skip Menu |

This queue is for tickets about the IPC-PubSub CPAN distribution.

Report information
The Basics
Id: 34767
Status: resolved
Priority: 0/
Queue: IPC-PubSub

People
Owner: Nobody in particular
Requestors: mpitts [...] a3its.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.27
Fixed in: (no value)



Subject: $sub->get dies after second round of message retrieval
Attached is a script that causes the following error to be thrown: Not an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/IPC/PubSub/Cache.pm line 56. This happens using DBM::Deep version 1.0009 ######### perl -v output This is perl, v5.8.8 built for x86_64-linux-thread-multi
Subject: test.pl
use IPC::PubSub; # A new message bus with the DBM::Deep backend # (Other possible backends include Memcached and PlainHash) # my $bus = IPC::PubSub->new(DBM_Deep => '/tmp/pubsub.db'); my $pid = fork(); if ( ! defined $pid ) { die "couldn't fork"; } elsif ( $pid ) { ## Parent my $bus = IPC::PubSub->new(DBM_Deep => '/tmp/pubsub.db'); # Register a new publisher (you can publish to multiple channels) #my $pub = $bus->new_publisher("#perl6"); # Register a new subscriber (you can subscribe to multiple channels) my $sub = $bus->new_subscriber("#perl6"); while(1) { print "about to check messages\n"; # Simple get: Returns the messages sent since the previous get, # but only for the first channel. my @msgs = $sub->get; foreach my $msg (@msgs) { print "$msg\n"; } sleep 5; } } else { ## Child my $bus = IPC::PubSub->new(DBM_Deep => '/tmp/pubsub.db'); # Register a new publisher (you can publish to multiple channels) my $pub = $bus->new_publisher("#perl6"); # Register a new subscriber (you can subscribe to multiple channels) #my $sub = $bus->new_subscriber("#perl6"); while (1) { # Publish a message (may be a complex object) to those channels # print "printing message from child"; $pub->msg("This is a message from the child"); sleep 1; } }
Hi - Sorry for getting around to it this late, but IPC-PubSub 0.28 should have it fixed. Thanks for your report! Cheers, Audrey