Plugin/Web/MobileAgent.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 82.1% 23 / 28 CC 2 SCAR 3.6
CC
2
Cov
89%
__ANON__
2.5
init
1.0
BEGIN
1.0
CRAP 1.4
« MobileJP.pm ↑ Summary
1 package Amon2::Plugin::Web::MobileAgent;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 our $VERSION = '0.11';
6  
7 3 ▶use HTTP::MobileAgent;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶sub init {
Subroutine init: called CC=1 SCAR=0.4
Pod undocumented
10 2 my ($class, $c, $conf) = @_;
11 Amon2::Util::add_method(
12 $c,
13 'mobile_agent',
14 2 ▶ sub {
Subroutine __ANON__: called CC=2 SCAR=9.2
15 2 ▶ $_[0]->{mobile_agent} ||= HTTP::MobileAgent->new($_[0]->req->headers);
Condition33%1/3
$_[0]{"mobile_agent"} ||= "HTTP::MobileAgent"->new($_[0]->req->headers)
l!l&&r!l&&!r
020
MC/DC0%0/2
$_[0]{"mobile_agent"} ||= "HTTP::MobileAgent"->new($_[0]->req->headers)
$_[0]{"mobile_agent"} "HTTP::MobileAgent"->new($_[0]->req->headers)
Truth table33%1/3
A ||= B
A= $_[0]{"mobile_agent"}B= "HTTP::MobileAgent"->new($_[0]->req->headers)
ABresult
1X1
011
000
16 }
17 2 );
18 }
19  
20 3 1;
21 __END__
« MobileJP.pm ↑ Summary