lib/HTML/FormFu/Plugin.pm

filter: Statementstmt 85.0% 17 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 6 / 10 Podpod 83.3% 5 / 6 totaltotal 77.7% 28 / 36 SCAR 0.0
CC
1
Cov
85%
clone
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/HTML/FormFu/Element/Number.pm ↑ Summary lib/HTML/FormFu/Constraint/MaxRange.pm »
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Plugin;
4 3 $HTML::FormFu::Plugin::VERSION = '2.06';
5 # ABSTRACT: base class for plugins
6  
7 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use MooseX::Attribute::Chained;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 with 'HTML::FormFu::Role::HasParent', 'HTML::FormFu::Role::Populate';
11  
12 3 ▶use HTML::FormFu::ObjectUtil qw( form parent );
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 has type => ( is => 'rw', traits => ['Chained'] );
15  
16 ▶sub pre_process { }
Subroutine pre_process: called CC=1 SCAR=0.0
Pod documented
17  
18 ▶sub process { }
Subroutine process: called CC=1 SCAR=0.0
Pod documented
19  
20 ▶sub post_process { }
Subroutine post_process: not called CC=1 SCAR=0.0
Pod documented
21  
22 ▶sub render { }
Subroutine render: not called CC=1 SCAR=0.0
Pod documented
23  
24 ▶sub post_render { }
Subroutine post_render: not called CC=1 SCAR=0.0
Pod documented
25  
26 sub clone {
27 0 ▶ my ($self) = @_;
Subroutine clone: not called CC=1 SCAR=6.9
Pod undocumented
28  
29 0 my %new = %$self;
30  
31 0 return bless \%new, ref $self;
32 }
33  
34 3 __PACKAGE__->meta->make_immutable;
35  
36 3 1;
37  
38 __END__
39  
40 =pod
41  
42 =encoding UTF-8
43  
44 =head1 NAME
45  
46 HTML::FormFu::Plugin - base class for plugins
47  
48 =head1 VERSION
49  
50 version 2.06
51  
52 =head2 DESCRIPTION
53  
54 Plugins can be added to a form or any element to modify their behaviour.
55 Some plugins should only be added to either a form, or an element, depending
56 on their design.
57  
58 =head1 METHODS
59  
60 Plugins can override any of the following method stubs.
61  
62 =head2 process
63  
64 Only plugins added to a form or a field element inheriting from
65 L<HTML::FormFu::Role::Element::Field> will have their C<process> method run.
66  
67 For form plugins, is called during L<HTML::FormFu/process>, before C<process>
68 is called on any elements.
69  
70 For field plugins, is called during the field's C<process> call.
71  
72 =head2 pre_process
73  
74 For form plugins, is called immediately after C<pre_process>
75 is run on the elements.
76  
77 For element plugins, is called before C<pre_process> is run on form plugins.
78  
79 =head2 post_process
80  
81 For form plugins, is called immediately before L<HTML::FormFu/process>
82 returns.
83  
84 For element plugins, is called before C<post_process> is run on form plugins.
85  
86 =head2 render
87  
88 Only plugins added to a form will have their C<render> method run.
89  
90 Is called during L<HTML::FormFu/render> before the
91 L<HTML::FormFu/render_method> is called.
92  
93 =head2 post_render
94  
95 Only plugins added to a form will have their C<post_render> method run.
96  
97 Is called during L<HTML::FormFu/render> immediately before
98 L<HTML::FormFu/render> return.
99  
100 Is passed a reference to the return value of L<HTML::FormFu/render_method>.
101  
102 =head1 CORE PLUGINS
103  
104 =over
105  
106 =item L<HTML::FormFu::Plugin::StashValid>
107  
108 =back
109  
110 =head1 AUTHOR
111  
112 Carl Franks, C<cfranks@cpan.org>
113  
114 =head1 LICENSE
115  
116 This library is free software, you can redistribute it and/or modify it under
117 the same terms as Perl itself.
118  
119 =head1 AUTHOR
120  
121 Carl Franks <cpan@fireartist.com>
122  
123 =head1 COPYRIGHT AND LICENSE
124  
125 This software is copyright (c) 2018 by Carl Franks.
126  
127 This is free software; you can redistribute it and/or modify it under
128 the same terms as the Perl 5 programming language system itself.
129  
130 =cut
« lib/HTML/FormFu/Element/Number.pm ↑ Summary lib/HTML/FormFu/Constraint/MaxRange.pm »