blib/lib/Event/idle.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran 50.0% 2 / 4 Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 74.4% 32 / 43 CC 6 SCAR 16.3
CC
6
Cov
79%
new
7.8
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« blib/lib/Event.pm ↑ Summary blib/lib/Event/group.pm »
1 25 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Event::idle;
3 25 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 25 ▶use base 'Event::Watcher';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 25 ▶use vars qw($DefaultPriority @ATTRIBUTE);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 25 @ATTRIBUTE = qw(hard max min);
8  
9 25 'Event::Watcher'->register;
10  
11 13 ▶sub new {
Subroutine new: called CC=6 SCAR=20.5
Pod undocumented
12 # lock %Event::;
13  
14 13 my $class = shift;
15 13 my %arg = @_;
16 13 ▶ my $o = allocate($class, delete $arg{attach_to} || {});
Condition50%1/2
delete $arg{'attach_to'} || {}
l!l
013
MC/DC0%0/1
delete $arg{'attach_to'} || {}
delete $arg{'attach_to'}
Truth table50%1/2
A
A= delete $arg{'attach_to'}
Aresult
11
00
17
18 # deprecated
19 13 for (qw(min max repeat)) {
20 39 ▶ if (exists $arg{"e_$_"}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $arg{"e_$_"}) 0 39 39
21 0 carp "'e_$_' is renamed to '$_'";
22 0 $arg{$_} = delete $arg{"e_$_"};
23 }
24 }
25  
26 13 ▶ $o->repeat(1) if defined $arg{min} || defined $arg{max};
Branch: 1 branch
BranchTrueFalseTotal
if defined $arg{"min"} or defined $arg{"max"} 0 13 13
Condition33%1/3
defined $arg{"min"} or defined $arg{"max"}
l!l&&r!l&&!r
0013
MC/DC0%0/2
defined $arg{"min"} or defined $arg{"max"}
defined $arg{"min"} defined $arg{"max"}
Truth table33%1/3
A or B
A= defined $arg{"min"}B= defined $arg{"max"}
ABresult
1X1
011
000
27 13 $o->init(\%arg);
28 13 $o;
29 }
30  
31 25 1;
« blib/lib/Event.pm ↑ Summary blib/lib/Event/group.pm »