lib/Reaction/InterfaceModel/Action/Role/SimpleMethodCall.pm

filter: Statementstmt 53.3% 8 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 43.4% 10 / 23 CC 2 SCAR 11.6
CC
2
Cov
47%
do_apply
6.0
can_apply
2.0
BEGIN
1.0
CRAP 3.2
« lib/Reaction/UI/Widget/Field/Mutable.pm ↑ Summary lib/Reaction/UI/Widget/Field/Mutable/MatchingPasswords.pm »
1 package Reaction::InterfaceModel::Action::Role::SimpleMethodCall;
2  
3 5 ▶use Reaction::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use Scalar::Util 'blessed';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 requires '_target_model_method';
6  
7 0 ▶sub can_apply { 1; }
Subroutine can_apply: not called CC=1 SCAR=6.9
Pod undocumented
8  
9 0 ▶sub do_apply {
Subroutine do_apply: not called CC=2 SCAR=17.9
Pod undocumented
10 0 my ($self) = @_;
11 0 my $object = $self->target_model;
12 0 my $method_name = $self->_target_model_method;
13 0 ▶ if(my $method_ref = $object->can($method_name)){
Branch: 1 branch
BranchTrueFalseTotal
if (my $method_ref = $object->can($method_name)) 0 0 0
14 0 return $object->$method_ref();
15 }
16 0 confess("Object ".blessed($object)." doesn't support method ${method_name}");
17 }
18  
19 5 1;
20  
21 __END__;
« lib/Reaction/UI/Widget/Field/Mutable.pm ↑ Summary lib/Reaction/UI/Widget/Field/Mutable/MatchingPasswords.pm »