| 1 | # You may distribute under the terms of the GNU General Public License | ||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||
| 3 | # (C) Paul Evans, 2008-2010 -- leonerd@leonerd.org.uk | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | package Circle::TaggedString; | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 4 | ▶ | use base qw( String::Tagged ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | sub squash | ||||||||||||||||||||||||||||
| 13 | { | ||||||||||||||||||||||||||||
| 14 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
squash: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 0 | my @output; | |||||||||||||||||||||||||||
| 17 | $self->iter_substr_nooverlap( sub { | ||||||||||||||||||||||||||||
| 18 | 0 | ▶ | my ( $str, %format ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 19 | 0 | ▶ | push @output, %format ? [ $str, %format ] : $str; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 20 | 0 | } ); | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | return $output[0] if @output == 1 and !ref $output[0]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@output == 1 and not ref $output[0]
MC/DC0%0/2
@output == 1 and not ref $output[0]
@output == 1
not ref $output[0]
Truth table0%0/3
A and not(B)
A= @output == 1B= not ref $output[0]
| |||||||||||||||||||||||||||||
| 23 | 0 | return \@output; | |||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 4 | 0x55AA; | |||||||||||||||||||||||||||