The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MouseX::POE - The Illicit Love Child of Mouse and POE

VERSION

version 0.216

SYNOPSIS

    package Counter;
    use MouseX::POE;

    has count => (
        isa     => 'Int',
        is      => 'rw',
        lazy    => 1,
        default => sub { 0 },
    );

    sub START {
        my ($self) = @_;
        $self->yield('increment');
    }

    event increment => sub {
        my ($self) = @_;
        print "Count is now " . $self->count . "\n";
        $self->count( $self->count + 1 );
        $self->yield('increment') unless $self->count > 3;
    };

    no MouseX::POE;

    Counter->new();
    POE::Kernel->run();

DESCRIPTION

MouseX::POE is a Mouse wrapper around a POE::Session.

METHODS

Default POE-related methods are provided by MouseX::POE::Meta::Trait::Object which is applied to your base class (which is usually Mouse::Object) when you use this module. See that module for the documentation for it. Below is a list of methods on that class so you know what to look for:

event $name $subref

Create an event handler named $name.

get_session_id

Get the internal POE Session ID, this is useful to hand to other POE aware functions.

yield

call

delay

alarm

alarm_add

delay_add

alarm_set

alarm_adjust

alarm_remove

alarm_remove_all

delay_set

delay_adjust

A cheap alias for the same POE::Kernel function which will gurantee posting to the object's session.

STARTALL

STOPALL

KEYWORDS

SEE ALSO

AUTHORS

  • Chris Prather <chris@prather.org>

  • Ash Berlin <ash@cpan.org>

  • Chris Williams <chris@bingosnet.co.uk>

  • Yuval (nothingmuch) Kogman

  • Torsten Raudssus <torsten@raudssus.de> http://www.raudssus.de/

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Chris Prather, Ash Berlin, Chris Williams, Yuval Kogman, Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.