lib/ComponentUI/Controller/TestModel/Foo.pm

filter: Statementstmt 70.9% 22 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 100% 1 / 1 totaltotal 70.7% 29 / 41 CC 1 SCAR 2.9
CC
1
Cov
71%
__ANON__
2.0
__ANON__
2.0
object
2.0
CRAP 1.3
« lib/ComponentUI/Controller/TestModel/Bar.pm ↑ Summary lib/Reaction/UI/ViewPort/Field/File.pm »
1 package ComponentUI::Controller::TestModel::Foo;
2  
3 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶BEGIN { extends 'Reaction::UI::Controller::Collection::CRUD'; }
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use aliased 'Reaction::UI::ViewPort::SearchableListViewContainer';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use aliased 'ComponentUI::TestModel::Foo::SearchSpec';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use aliased 'ComponentUI::TestModel::Foo::Action::SearchSpec::Update';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 __PACKAGE__->config(
11 model_name => 'TestModel',
12 collection_name => 'Foo',
13 action => {
14 base => { Chained => '/base', PathPart => 'testmodel/foo' },
15 list => {
16 ViewPort => {
17 action_prototypes => { delete_all => 'Delete all records' },
18 excluded_fields => [qw/id/],
19 action_order => [qw/delete_all create/],
20 enable_order_by => [qw/last_name/],
21 Member => {
22 action_order => [qw/view update delete/],
23 },
24 },
25 },
26 view => {
27 ViewPort => {
28 excluded_fields => [qw/id/],
29 },
30 },
31 delete => {
32 ViewPort => {message => 'Are you sure you want to delete this Foo?'}
33 },
34 },
35 );
36  
37 3 for my $action (qw/view create update/){
38 9 __PACKAGE__->config(
39 action => {
40 $action => {
41 ViewPort => {
42 container_layouts => [
43 { name => 'primary', fields => [qw/first_name last_name/]},
44 {
45 name => 'secondary',
46 label => 'Optional Label',
47 fields => [qw/bars bazes/],
48 },
49 ],
50 },
51 },
52 }
53 );
54 }
55  
56 0 ▶override _build_action_viewport_map => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
57 0 my $map = super();
58 0 $map->{list} = SearchableListViewContainer;
59 0 return $map;
60 3 };
61  
62 0 ▶override _build_action_viewport_args => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
63 0 my $args = super();
64 0 $args->{list}{spec_class} = SearchSpec;
65 0 $args->{list}{action_class} = Update;
66 0 return $args;
67 3 };
68  
69 0 ▶sub object : Chained('base') PathPart('id') CaptureArgs(1) {
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
70 0 my ($self, $c, $object) = @_;
71 0 $self->next::method($c, $object);
72 # just as failing use case
73 3 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
74  
75 3 1;
76  
77 __END__;
« lib/ComponentUI/Controller/TestModel/Bar.pm ↑ Summary lib/Reaction/UI/ViewPort/Field/File.pm »