line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Form::Factory::Feature::Role::PreProcess; |
2
|
|
|
|
|
|
|
$Form::Factory::Feature::Role::PreProcess::VERSION = '0.022'; |
3
|
1
|
|
|
1
|
|
381
|
use Moose::Role; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
requires qw( pre_process ); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: features that run just before processing |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
1; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__END__ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=pod |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=encoding UTF-8 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Form::Factory::Feature::Role::PreProcess - features that run just before processing |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 VERSION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
version 0.022 |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SYNOPSIS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
package MyApp::Feature::Baz; |
29
|
|
|
|
|
|
|
use Moose; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
with qw( |
32
|
|
|
|
|
|
|
Form::Factory::Feature |
33
|
|
|
|
|
|
|
Form::Factory::Feature::Role::PreProcess |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub pre_process { |
37
|
|
|
|
|
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
MyApp::Logger->info('Starting to process.'); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
package Form::Factory::Feature::Custom::Baz; |
42
|
|
|
|
|
|
|
sub register_implementation { 'MyApp::Feature::Baz' } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
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 L<Form::Factory::Feature::Role::Check>. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 ROLE METHOD |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 pre_process |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This method is called immediately before the C<run> method is called. It is passed no arguments other than the feature object it is called upon. It's return value is ignored. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This method can be used to prevent the C<run> method from being called by throwing an exception. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Andrew Sterling Hanenkamp <hanenkamp@cpan.org> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Qubling Software LLC. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
65
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |