DirWatch/Modified.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 29 / 29 CC 3 SCAR 7.9
CC
3
Cov
100%
__ANON__
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« DirWatch.pm ↑ Summary DirWatch/New.pm »
1 package POE::Component::DirWatch::Modified;
2  
3 2 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = "0.300004";
7  
8 2 extends 'POE::Component::DirWatch';
9 2 with 'POE::Component::DirWatch::Role::Signatures';
10  
11 #--------#---------#---------#---------#---------#---------#---------#---------
12  
13 8 ▶around '_file_callback' => sub {
Subroutine __ANON__: called CC=3 SCAR=11.0
14 8 my $orig = shift;
15 8 my ($self, $file) = @_[OBJECT, ARG0];
16 8 my $sigs = $self->signatures;
17 8 my $new_sig = $self->_generate_signature($file);
18 8 ▶ return if exists $sigs->{"$file"} && $sigs->{"$file"} eq $new_sig;
Branch: 1 branch
BranchTrueFalseTotal
if exists $$sigs{"$file"} and $$sigs{"$file"} eq $new_sig 5 3 8
Condition100%3/3
exists $$sigs{"$file"} and $$sigs{"$file"} eq $new_sig
!ll&&!rl&&r
215
MC/DC100%2/2
exists $$sigs{"$file"} and $$sigs{"$file"} eq $new_sig
exists $$sigs{"$file"} $$sigs{"$file"} eq $new_sig
Truth table100%3/3
A and B
A= exists $$sigs{"$file"}B= $$sigs{"$file"} eq $new_sig
ABresult
0X0
100
111
19 3 $sigs->{"$file"} = $new_sig;
20 3 return $orig->(@_);
21 2 };
22  
23 2 __PACKAGE__->meta->make_immutable;
24  
25 2 1;
26  
27 __END__;
« DirWatch.pm ↑ Summary DirWatch/New.pm »