Catalyst::Plugin::Observe - Observe Engine Events


NAME

Catalyst::Plugin::Observe - Observe Engine Events

Back to Top


SYNOPSIS

    use Catalyst qw[Observe];
    # register the observer method as a callback to prepare_path
    MyApp->add_subscriber( 'prepare_path', \&observer );
    # write callback to describe what happened
    sub observer {
        my ( $c, $event, @args ) = @_;
        $c->log->info( "observed " . $event . " with arguments " . join( '\n', @args ) );
    }

Back to Top


DESCRIPTION

Observe Engine events, for debugging purposes. Subclasses the Class::Publisher manpage.

Catalyst::Plugin::Observe allows you to register your own callbacks to specific Engine events (method calls), and to be notified through the callback when they occur. When the Engine calls the event, your callback will be called with the same arguments, which you can then display (etc.) as necessary.

Back to Top


CALLBACK VARIABLES

$event

The Engine event to which the callback is registered. See OBSERVABLE EVENTS below.

@args

The arguments passed to the Engine event.

Back to Top


OBSERVABLE EVENTS

dispatch
finalize
finalize_body
finalize_cookies
finalize_error
finalize_headers
forward
prepare
prepare_action
prepare_body
prepare_connection
prepare_cookies
prepare_headers
prepare_parameters
prepare_path
prepare_request
prepare_uploads

Back to Top


SEE ALSO

the Class::Publisher manpage, the Catalyst::Dispatch manpage, the Catalyst::Engine manpage.

Back to Top


AUTHOR

Christian Hansen, ch@ngmedia.com

Back to Top


LICENSE

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.

Back to Top

 Catalyst::Plugin::Observe - Observe Engine Events