SyForm/ViewRole/Success.pm

filter: Statementstmt 100% 13 / 13 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 95.0% 19 / 20 CC 2 SCAR 3.0
CC
2
Cov
93%
_build_success
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« SyForm/Exception.pm ↑ Summary SyForm/Exception/UnknownErrorOnBuildFields.pm »
1 package SyForm::ViewRole::Success;
2 6 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 $SyForm::ViewRole::Success::AUTHORITY = 'cpan:GETTY';
4 }
5 # ABSTRACT: Fetching success value from SyForn::Results of give back true
6 6 $SyForm::ViewRole::Success::VERSION = '0.103';
7 6 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 6 ▶use overload 'bool' => sub { $_[0]->success };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
10  
11 6 has success => (
12 is => 'lazy',
13 );
14  
15 6 ▶sub _build_success {
Subroutine _build_success: called CC=2 SCAR=7.2
16 6 my ( $self ) = @_;
17 6 ▶ return $self->results->does('SyForm::ResultsRole::Success')
Branch: 1 branch
BranchTrueFalseTotal
$self->results->does('SyForm::ResultsRole::Success') ? : 6 0 6
18 ? $self->results->success : 1;
19 }
20  
21 6 1;
22  
23 __END__
« SyForm/Exception.pm ↑ Summary SyForm/Exception/UnknownErrorOnBuildFields.pm »