Rocco Caputo > POE-Stage-0.060 > POE::Callback

Download:
POE-Stage-0.060.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

POE::Callback - object wrapper for callbacks with lexical closures

SYNOPSIS ^

        # TODO - Make this a complete working example.
        my $callback = POE::Callback->new(
                name => "Pkg::sub",
                code => \&coderef,
        );
        $callback->(@arguments);

DESCRIPTION ^

POE::Callback wraps coderefs in magic that makes certain lexical variables persistent between calls.

It's used internally by the classes that comprise POE::Stage.

new CODEREF

Creates a new callback from a raw CODEREF. Returns the callback, which is just the CODEREF blessed into POE::Callback.

syntax highlighting: