TaskPipe/Role/MooseType_UserAgentType.pm

filter: Statementstmt 88.8% 8 / 9 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 43.4% 10 / 23 CC 3 SCAR 20.3
CC
3
Cov
47%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
« TaskPipe/Tool/Command_Setup.pm ↑ Summary TaskPipe/Template.pm »
1 package TaskPipe::Role::MooseType_UserAgentType;
2  
3 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 subtype 'UserAgentType',
7 as 'Any',
8 where {
9 0 ▶ ref $_
Subroutine __ANON__: not called CC=3 SCAR=24.8
Branch: 1 branch
BranchTrueFalseTotal
ref $_ and ref $_ eq "LWP::UserAgent" || ref $_ eq "WWW::Mechanize::PhantomJS" 0 0 0
Condition0%0/6
ref $_ && (ref $_ eq 'LWP::UserAgent' || ref $_ eq 'WWW::Mechanize::PhantomJS')
!ll&&!rl&&r
000
ref $_ eq "LWP::UserAgent" or ref $_ eq "WWW::Mechanize::PhantomJS"
l!l&&r!l&&!r
000
MC/DC0%0/3
ref $_ && (ref $_ eq 'LWP::UserAgent' || ref $_ eq 'WWW::Mechanize::PhantomJS')
ref $_ ref $_ eq "LWP::UserAgent" ref $_ eq "WWW::Mechanize::PhantomJS"
Truth table0%0/4
A && B or C
A= ref $_B= ref $_ eq "LWP::UserAgent"C= ref $_ eq "WWW::Mechanize::PhantomJS"
ABCresult
0XX0
1000
11X1
1011
10 && (ref $_ eq 'LWP::UserAgent'
11 || ref $_ eq 'WWW::Mechanize::PhantomJS')
12 1 };
13  
14 =head1 NAME
15  
16 TaskPipe::Role::MooseType_UserAgentType - user agent type type constraint
17  
18 =head1 DESCRIPTION
19  
20 A moose subtype to be included as a role
21  
22 =head1 AUTHOR
23  
24 Tom Gracey <tomgracey@gmail.com>
25  
26 =head1 COPYRIGHT AND LICENSE
27  
28 Copyright (c) Tom Gracey 2018
29  
30 TaskPipe is free software, licensed under
31  
32 The GNU Public License Version 3
33  
34 =cut
35  
36 1 1;
« TaskPipe/Tool/Command_Setup.pm ↑ Summary TaskPipe/Template.pm »