Peter Sergeant > Infobot-0.91_05 > Infobot::Pipeline

Download:
Infobot-0.91_05.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Infobot::Pipeline - Main application pipeline

SYNOPSIS ^

        $self->stash('pipeline')->add( 10, Plugin->new );
        
        $self->stash('pipeline')->process( $message_object );

METHODS ^

init

Basic setup

add

Accepts a priority, and an object. Higher the priority, the earlier the process method of your object is called. It should return 1 to derail the pipeline (and basically say "I'm handling this, and I alone am handling this!"), or 0 to keep trying the other things in the pipeline.

process

Accepts a message object, and feeds it to each of the query objects, until one turns true, or until we've tried them all.