blib/lib/OpenFrame.pm

filter: Statementstmt 76.0% 19 / 25 Branchbran 37.5% 3 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 50.0% 1 / 2 totaltotal 68.2% 28 / 41 CC 5 SCAR 16.7
CC
5
Cov
67%
debug_level
9.4
init
2.0
BEGIN
1.0
CRAP 5.3
« blib/lib/OpenFrame/Cookies.pm ↑ Summary blib/lib/OpenFrame/Request.pm »
1 package OpenFrame;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings::register;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 our $VERSION=3.05;
7  
8 5 %OpenFrame::DEBUG = (
9 ALL => 0,
10 );
11  
12 5 ▶use Pipeline;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 5 ▶use base qw ( Pipeline );
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 0 ▶sub init {
Subroutine init: not called CC=1 SCAR=6.9
Pod documented
16 0 my $self = shift;
17 0 $self->SUPER::init();
18 }
19  
20 1 ▶sub debug_level {
Subroutine debug_level: called CC=5 SCAR=22.5
Pod undocumented
21 1 my $self = shift;
22  
23 ## is this a set, a get, or what?
24 1 ▶ if (@_ == 0) {
Branch: 3 branches
BranchTrueFalseTotal
if (@_ == 0) { } 0 1 1
elsif (@_ == 1) { } 1 0 1
elsif (@_ == 2) { } 0 0 0
25 ## this is a get of ALL
26 0 return $OpenFrame::DEBUG{ ALL };
27 } elsif (@_ == 1) {
28 ## this could either be a set of ALL, or a request for an individual package's
29 ## debug value.
30 1 ▶ if ($_[0] =~ /\D/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[0] =~ /\D/) { } 0 1 1
31 ## we have non-digit characters, we are getting the value for a specific
32 ## package
33 0 return $OpenFrame::DEBUG{ $_[0] };
34 } else {
35 ## these are digits, we are setting ALL
36 1 $OpenFrame::DEBUG{ ALL } = $_[0]
37 }
38 } elsif (@_ == 2) {
39 0 $OpenFrame::DEBUG{ shift @_ } = shift @_ ;
40 } else {
41 0 die "invalid number of parameters to &OpenFrame::debug_level";
42 }
43 }
44  
45 5 1;
46  
47 __END__
« blib/lib/OpenFrame/Cookies.pm ↑ Summary blib/lib/OpenFrame/Request.pm »