Form::Factory::Feature::Role::PreProcess - features that run just before processing


Form-Factory documentation Contained in the Form-Factory distribution.

Index


Code Index:

NAME

Top

Form::Factory::Feature::Role::PreProcess - features that run just before processing

VERSION

Top

version 0.020

SYNOPSIS

Top

  package MyApp::Feature::Baz;
  use Moose;

  with qw(
      Form::Factory::Feature
      Form::Factory::Feature::Role::PreProcess
  );

  sub pre_process {
      my $self = shift;
      MyApp::Logger->info('Starting to process.');
  }

  package Form::Factory::Feature::Custom::Baz;
  sub register_implementation { 'MyApp::Feature::Baz' }

DESCRIPTION

Top

Features that run something immediately before the action runs may implement this role. This feature cannot stop the action from running. That must be performed with a Form::Factory::Feature::Role::Check.

ROLE METHOD

Top

pre_process

This method is called immediately before the run method is called. It is passed no arguments other than the feature object it is called upon. It's return value is ignored.

This method can be used to prevent the run method from being called by throwing an exception.

AUTHOR

Top

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE

Top


Form-Factory documentation Contained in the Form-Factory distribution.

package Form::Factory::Feature::Role::PreProcess;
BEGIN {
  $Form::Factory::Feature::Role::PreProcess::VERSION = '0.020';
}
use Moose::Role;

requires qw( pre_process );

1;