__PACKAGE__->run(); #### # Call back run_dequeue every $seconds seconds. __PACKAGE__->new( check_for_dequeue => $seconds )->run(); #### sub run_dequeue { my ($self) = @_; # Can't spend long here because it blocks the entire server. ... }