lib/Reaction/UI/ViewPort/Field/Mutable/File.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 1 totaltotal 51.4% 18 / 35 CC 3 SCAR 12.6
CC
3
Cov
54%
__ANON__
6.0
adopt_value_string
6.0
__ANON__
1.1
CRAP 3.5
« script/rclass_back_to_moose.pl ↑ Summary lib/Reaction/UI/Widget/Value/Image.pm »
1 package Reaction::UI::ViewPort::Field::Mutable::File;
2  
3 4 ▶use Reaction::Types::File qw/Upload/;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use Reaction::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use namespace::clean -except => [ qw(meta) ];
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 extends 'Reaction::UI::ViewPort::Field';
8  
9 4 with 'Reaction::UI::ViewPort::Field::Role::Mutable::Simple'
10 => { value_type => Upload };
11  
12 0 ▶override apply_our_events => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
13 0 my ($self, $events) = @_;
14 0 my $value_key = $self->event_id_for('value_string');
15 0 ▶ if (my $upload = $self->ctx->req->upload($value_key)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $upload = $self->ctx->req->upload($value_key)) { } 0 0 0
16 0 local $events->{$value_key} = $upload;
17 0 return super();
18 } else {
19 0 return super();
20 }
21 4 };
22 0 ▶sub adopt_value_string {
Subroutine adopt_value_string: not called CC=2 SCAR=17.9
Pod undocumented
23 0 my($self) = @_;
24 0 ▶ $self->value($self->value_string) if $self->value_string;
Branch: 1 branch
BranchTrueFalseTotal
if $self->value_string 0 0 0
25 };
26 0 ▶override _value_string_from_value => sub { '' };
Subroutine __ANON__: not called CC=1 SCAR=1.2
27  
28 4 __PACKAGE__->meta->make_immutable;
29  
30  
31 4 1;
« script/rclass_back_to_moose.pl ↑ Summary lib/Reaction/UI/Widget/Value/Image.pm »