Sledge::Plugin::BeforeOutput - add trigger before outout plugin for Sledge.
Version 0.03
package YourProj::Pages::Foo; use Sledge::Plugin::BeforeOutput; __PACKAGE__->register_hook ( BEFORE_OUTPUT => sub { my $self = shift; ## do something. } ); sub dispatch_index { my $self = shift; } ...
This module adds BEFORE_OUTPUT hook to Sledge.
BEFORE_OUTPUT is carried out between AFTER_DISPATCH and AFTER_OUTPUT, that is step before Template rendering start.
An example with Sledge::Plugin::Stash
package YourProj::Pages::Foo; use Sledge::Plugin::BeforeOutput; ## You must declare it earlier than other plugin. use Sledge::Plugin::Stash; sub dispatch_index { my $self = shift; $self->stash->{foo} = 'bar'; } ...
Class::Trigger
Sledge::Plugin::Stash Sledge::Plugin::URIWith Sledge::Plugin::DebugMessage
Please report any bugs or suggestions at http://rt.cpan.org/NoAuth/Bugs.html?Dist=Sledge-Plugin-BeforeOutput
syushi matsumoto, <matsumoto at alink.co.jp>
<matsumoto at alink.co.jp>
Copyright (C) 2009 Alink INC. all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Sledge::Plugin::BeforeOutput, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sledge::Plugin::BeforeOutput
CPAN shell
perl -MCPAN -e shell install Sledge::Plugin::BeforeOutput
For more information on module installation, please visit the detailed CPAN module installation guide.