Catalyst::Plugin::Observe - Observe Engine Events
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 ) ); }
Observe Engine events, for debugging purposes. Subclasses Class::Publisher.
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.
Catalyst::Plugin::Observe
$event
The Engine event to which the callback is registered. See "OBSERVABLE EVENTS" below.
@args
The arguments passed to the Engine event.
Class::Publisher, Catalyst::Dispatch, Catalyst::Engine.
Christian Hansen, ch@ngmedia.com
ch@ngmedia.com
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
To install Catalyst::Plugin::Observe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Observe
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Observe
For more information on module installation, please visit the detailed CPAN module installation guide.