Wiki/Node/Item.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 35 / 35 CC 3 SCAR 5.6
CC
3
Cov
100%
_as_wiki
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« Wiki.pm ↑ Summary Wiki/Node/Mono.pm »
1 #############################################################################
2 # (c) by Tels 2004. Part of Convert::Wiki
3 #
4 # represents an item in a list (aka <li> or *)
5 #############################################################################
6  
7 package Convert::Wiki::Node::Item;
8  
9 4 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 4 ▶use Convert::Wiki::Node;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 4 ▶use vars qw/$VERSION @ISA/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 4 @ISA = qw/Convert::Wiki::Node/;
18  
19 4 $VERSION = '0.03';
20  
21 #############################################################################
22  
23 sub _as_wiki
24 8 ▶ {
Subroutine _as_wiki: called CC=3 SCAR=11.0
25 8 my ($self,$txt) = @_;
26  
27 # "* Foo bar is baz.\n"
28 8 my $trailing = "\n";
29  
30 # add a new line if the next node is not an item
31 8 my $next = $self->{next};
32 8 ▶ $trailing .= "\n" if defined $next && $next->type() ne 'item';
Branch: 1 branch
BranchTrueFalseTotal
if defined $next and $next->type ne "item" 2 6 8
Condition100%3/3
defined $next and $next->type ne "item"
!ll&&!rl&&r
332
MC/DC100%2/2
defined $next and $next->type ne "item"
defined $next $next->type ne "item"
Truth table100%3/3
A and B
A= defined $nextB= $next->type ne "item"
ABresult
0X0
100
111
33  
34 8 '* ' . $txt . $trailing;
35 }
36  
37 4 1;
38 __END__
« Wiki.pm ↑ Summary Wiki/Node/Mono.pm »