Timm Murray > UAV-Pilot-1.0 > UAV::Pilot::Events

Download:
UAV-Pilot-1.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  2
View/Report Bugs
Source  

NAME ^

  UAV::Pilot::Events

SYNOPSIS ^

    my $condvar = AnyEvent->condvar;
    my $events = UAV::Pilot::Events->new({
        condvar => $condvar,
    });
    $events->register( ... );
    $events->init_event_loop;
    $condvar->recv;

DESCRIPTION ^

Handles event loops on a regular timer.

METHODS ^

new

    new({
        condvar => $cv,
    })

Constructor. The condvar argument is an AnyEvent::Condvar.

register

    register( $event_handler )

Adds a object that does the UAV::Pilot::EventHandler role to the list. The process_events method on that object will be called each time the event loop runs.

init_event_loop

Sets up the event loop. Note that you must still call recv on the AnyEvent::Condvar to start the loop running.

syntax highlighting: