Catalyst/Controller/HTML/FormFu/Action/MultiForm.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 42 CC 3 SCAR 18.4
CC
3
Cov
0%
execute
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 6.3
1 package Catalyst::Controller::HTML::FormFu::Action::MultiForm;
2  
3 use strict;
4  
5 our $VERSION = '2.04'; # VERSION
6 our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
7  
8 use Moose;
9 use Config::Any;
10 use namespace::autoclean;
11  
12 extends 'Catalyst::Controller::HTML::FormFu::ActionBase::Form';
13  
14 sub execute {
15 my $self = shift;
16 my ( $controller, $c ) = @_;
17  
18 if ( $self->reverse =~ $self->_form_action_regex ) {
19  
20 # don't load form again
21 return $self->next::method(@_);
22 }
23  
24 my $config = $controller->_html_formfu_config;
25  
26 return $self->next::method(@_)
27 unless exists $self->attributes->{ActionClass}
28 && $self->attributes->{ActionClass}[0] eq $config->{multiform_action};
29  
30 my $multi = $controller->_multiform;
31  
32 $multi->process;
33  
34 $c->stash->{ $config->{multiform_stash} } = $multi;
35 $c->stash->{ $config->{form_stash} } = $multi->current_form;
36  
37 $self->next::method(@_);
38 }
39  
40 1;
41  
42 __END__