Wiki/Node/Line.pm

filter: Statementstmt 100% 26 / 26 Branchbran 100% 2 / 2 Conditioncond 66.6% 4 / 6 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 90.9% 40 / 44 CC 4 SCAR 8.0
CC
4
Cov
94%
_remove_me
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Wiki/Node/Head.pm ↑ Summary Wiki.pm »
1 #############################################################################
2 # (c) by Tels 2004. Part of Convert::Wiki
3 #
4 # represents a horizontal line (or ruler)
5 #############################################################################
6  
7 package Convert::Wiki::Node::Line;
8  
9 3 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶use Convert::Wiki::Node;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶use vars qw/$VERSION @ISA/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 3 @ISA = qw/Convert::Wiki::Node/;
18 3 $VERSION = '0.03';
19  
20 #############################################################################
21  
22 sub _init
23 5 ▶ {
Subroutine _init: called CC=1 SCAR=0.0
24 5 my ($self,$args) = @_;
25  
26 5 $self->SUPER::_init($args);
27  
28 5 $self->{txt} = "----\n\n";
29  
30 5 $self;
31 }
32  
33 sub _remove_me
34 2 ▶ {
Subroutine _remove_me: called CC=4 SCAR=14.0
35 # if we are the first node, or a headline follows us, skip
36 2 my $self = shift;
37  
38 2 my $next = $self->next();
39  
40 2 ▶ if (!defined $self->prev() || (defined $next && $next->type() =~ /head/))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $self->prev or defined $next and $next->type =~ /head/) 1 1 2
Condition66%4/6
not defined $self->prev or defined $next and $next->type =~ /head/
l!l&&r!l&&!r
011
defined $next and $next->type =~ /head/
!ll&&!rl&&r
011
MC/DC33%1/3
not defined $self->prev or defined $next and $next->type =~ /head/
not defined $self->prev defined $next $next->type =~ /head/
Truth table50%2/4
not(A) or B and C
A= not defined $self->prevB= defined $nextC= $next->type =~ /head/
ABCresult
1XX1
0111
00X0
0100
41 {
42 1 return 1;
43 }
44 1 0;
45 }
46  
47 3 1;
48 __END__
« Wiki/Node/Head.pm ↑ Summary Wiki.pm »