RobotToken.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 90.9% 40 / 44 CC 1 SCAR 0.0
CC
1
Cov
94%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RobotDirective.pm ↑ Summary ParseState.pm »
1 ###############################################################################
2 package CrawlerCommons::RobotToken;
3  
4 # MODULE IMPORTS
5 ########################################
6 # Pragmas
7 #------------------#
8 2 ▶use 5.10.1;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # CPAN/Core
14 #------------------#
15 2 ▶use Const::Fast;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 # Moose Setup
19 #------------------#
20 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 # Moose Pragmas
24 #------------------#
25  
26 # Custom Modules
27 #------------------#
28  
29  
30  
31 # VARIABLES/CONSTANTS
32 ########################################
33 # Debug Constants
34 #------------------#
35 2 ▶const my $DEBUG => $ENV{DEBUG} // 0;
Condition50%1/2
$ENV{"DEBUG"} // 0
l!l
02
MC/DC0%0/1
$ENV{"DEBUG"} // 0
$ENV{"DEBUG"}
Truth table50%1/2
A
A= $ENV{"DEBUG"}
Aresult
11
00
36 2 ▶const my $TEST => $ENV{TEST} // 1;
Condition50%1/2
$ENV{"TEST"} // 1
l!l
02
MC/DC0%0/1
$ENV{"TEST"} // 1
$ENV{"TEST"}
Truth table50%1/2
A
A= $ENV{"TEST"}
Aresult
11
00
37  
38 # Constants
39 #------------------#
40  
41 # Variables
42 #------------------#
43 2 our $VERSION = '0.03';
44  
45  
46 # ATTRIBUTES
47 ########################################
48 # Class
49 #------------------#
50 #-----------------------------------------------------------------------------#
51 #-----------------------------------------------------------------------------#
52  
53 # Instance
54 #------------------#
55 #-----------------------------------------------------------------------------#
56 2 has 'data' => (
57 is => 'ro',
58 isa => 'Str',
59 required => 1,
60 );
61 #-----------------------------------------------------------------------------#
62 2 has 'directive' => (
63 is => 'ro',
64 isa => 'CrawlerCommons::RobotDirective',
65 required => 1,
66 );
67 #-----------------------------------------------------------------------------#
68  
69 # METHODS
70 ########################################
71 # Constructor
72 #------------------#
73 #-----------------------------------------------------------------------------#
74 #-----------------------------------------------------------------------------#
75  
76 # Class Methods
77 #------------------#
78 #-----------------------------------------------------------------------------#
79 #-----------------------------------------------------------------------------#
80  
81 # Instance Methods
82 #------------------#
83 #-----------------------------------------------------------------------------#
84 #-----------------------------------------------------------------------------#
85  
86 # Private Methods
87 #------------------#
88 #-----------------------------------------------------------------------------#
89 #-----------------------------------------------------------------------------#
90 ###############################################################################
91  
92 2 __PACKAGE__->meta->make_immutable;
93  
94 ###############################################################################
95  
96 2 1;
97  
98 __END__
« RobotDirective.pm ↑ Summary ParseState.pm »