blib/lib/Event/generic.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 86.2% 25 / 29 CC 2 SCAR 3.6
CC
2
Cov
90%
new
2.0
watch
2.0
BEGIN
1.0
CRAP 1.4
« blib/lib/Event/io.pm ↑ Summary blib/lib/Event/var.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Event::generic;
3 1 ▶use base 'Event::Watcher';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw(@ATTRIBUTE);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 @ATTRIBUTE = qw(source);
6  
7 1 'Event::Watcher'->register;
8  
9 2 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod documented
10 # lock %Event::;
11  
12 2 my $class = shift;
13 2 my %arg = @_;
14 2 ▶ my $o = allocate($class, delete $arg{attach_to} || {});
Condition50%1/2
delete $arg{'attach_to'} || {}
l!l
02
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
15 2 $o->init(\%arg);
16 2 $o;
17 }
18  
19 package Event::generic::Source;
20  
21 1 ▶sub new($) {
Subroutine new: called CC=1 SCAR=0.0
22 1 return allocate($_[0], {});
23 }
24  
25 0 ▶sub watch(@) {
Subroutine watch: not called CC=1 SCAR=6.9
26 0 return Event->generic("source", @_);
27 }
28  
29 1 1;
« blib/lib/Event/io.pm ↑ Summary blib/lib/Event/var.pm »