Skip Menu |

This queue is for tickets about the POE-Component-DBIAgent CPAN distribution.

Report information
The Basics
Id: 28668
Status: new
Priority: 0/
Queue: POE-Component-DBIAgent

People
Owner: Nobody in particular
Requestors: fabrice [...] coredmp.net
Cc:
AdminCc:

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



Subject: DBIAgent wont stop when the method finish() is called
Hello, When all the thing are done, i try to terminate the session nicely by calling finish() on the DBIAgent. But it won't stop. Manage to correct the problem in DBIAgent::Queue. Think a return is missing in function "remove_by_wheelid" Original: sub remove_by_wheelid { my( $self, $wheel_id ) = @_; $self->_remove_by( sub { $_[0]->ID == $wheel_id } ); } Version which terminate now: sub remove_by_wheelid { my( $self, $wheel_id ) = @_; return($self->_remove_by( sub { $_[0]->ID == $wheel_id } )); } The return value is needed here : =item make_next Force the helper with the specified wheel id to the head of the queue. =cut sub make_next { my $self = shift; my $id = shift; my $ret = $self->remove_by_wheelid( $id ); $self->_queue_unshift( $ret ); } Hope it helps And by the way thanks for the work :) Cdlt Fabrice
From: fabrice [...] coredmp.net
Le Sam. Aoû. 04 11:34:04 2007, coredmp a écrit : Show quoted text
> Hello,
I forget to give my environment sorry : Ubuntu Festy 7.04 Perl v5.8.8 built for i486-linux-gnu-thread-multi Show quoted text
> > When all the thing are done, i try to terminate the session nicely by
Seems that the code in _remove_by of Queues.pm is faultly, the splice won't work, i replace it by : sub _remove_by { my( $self, $predicate ) = @_; my $index = ( $self->_find_by( $predicate ) )[0]; my $ret; if(defined $index) { $ret=splice( @{$self->{_queue}}, $index, 1 ); } return $ret; } Show quoted text
> > Fabrice