| 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
Condition66%4/6
not defined $self->prev or defined $next and $next->type =~ /head/
defined $next and $next->type =~ /head/
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/
| |||||||||||||||||||||||||||||||||||||||||||
| 41 | { | ||||||||||||||||||||||||||||||||||||||||||
| 42 | 1 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||
| 44 | 1 | 0; | |||||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 48 | __END__ | ||||||||||||||||||||||||||||||||||||||||||