Author image syushi matsumoto
and 1 contributors

NAME

Sledge::Plugin::BeforeOutput - add trigger before outout plugin for Sledge.

VERSION

Version 0.03

SYNOPSIS

Sledge Controller Class

  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;
  }
  ...

DESCRIPTION

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.

EXAMPLE

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';
  }
  ...

SEE ALSO

Class::Trigger

Sledge::Plugin::Stash Sledge::Plugin::URIWith Sledge::Plugin::DebugMessage

BUGS

Please report any bugs or suggestions at http://rt.cpan.org/NoAuth/Bugs.html?Dist=Sledge-Plugin-BeforeOutput

AUTHOR

syushi matsumoto, <matsumoto at alink.co.jp>

COPYRIGHT AND LICENSE

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.