Catalyst/Controller/HTML/FormFu/Action/Form.pm

filter: Statementstmt 96.1% 25 / 26 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 82.9% 34 / 41 CC 4 SCAR 9.9
CC
4
Cov
85%
execute
4.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« HTML/FormFu/Element/RequestToken.pm ↑ Summary HTML/FormFu/Plugin/RequestToken.pm »
1 package Catalyst::Controller::HTML::FormFu::Action::Form;
2  
3 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 9 our $VERSION = '2.04'; # VERSION
6 9 our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
7  
8 9 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 ▶use Config::Any;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 9 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 9 extends 'Catalyst::Controller::HTML::FormFu::ActionBase::Form';
13  
14 27 ▶sub execute {
Subroutine execute: called CC=4 SCAR=14.8
Pod documented
15 27 my $self = shift;
16 27 my ( $controller, $c ) = @_;
17  
18 27 ▶ if ( $self->reverse =~ $self->_form_action_regex ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->reverse =~ $self->_form_action_regex) 0 27 27
19  
20 # don't load form again
21 0 return $self->next::method(@_);
22 }
23  
24 27 my $config = $controller->_html_formfu_config;
25  
26 return $self->next::method(@_)
27 unless exists $self->attributes->{ActionClass}
28 27 ▶ && $self->attributes->{ActionClass}[0] eq $config->{form_action};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->attributes->{"ActionClass"} and $self->attributes->{"ActionClass"}[0] eq $config->{"form_action"} 0 27 27
Condition33%1/3
exists $self->attributes->{"ActionClass"} and $self->attributes->{"ActionClass"}[0] eq $config->{"form_action"}
!ll&&!rl&&r
0027
MC/DC0%0/2
exists $self->attributes->{"ActionClass"} and $self->attributes->{"ActionClass"}[0] eq $config->{"form_action"}
exists $self->attributes->{"ActionClass"} $self->attributes->{"ActionClass"}[0] eq $config->{"form_action"}
Truth table33%1/3
A and B
A= exists $self->attributes->{"ActionClass"}B= $self->attributes->{"ActionClass"}[0] eq $config->{"form_action"}
ABresult
0X0
100
111
29  
30 27 my $form = $controller->_form;
31  
32 27 $form->process;
33  
34 27 $c->stash->{ $config->{form_stash} } = $form;
35  
36 27 $self->next::method(@_);
37 }
38  
39 9 1;
40  
41 __END__
« HTML/FormFu/Element/RequestToken.pm ↑ Summary HTML/FormFu/Plugin/RequestToken.pm »