| 1 | package Localizer::Scanner::Perl; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use 5.010_001; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use constant NUL => 0; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use constant BEG => 1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use constant PAR => 2; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use constant HERE => 10; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | ▶ | use constant QUO1 => 3; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use constant QUO2 => 4; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use constant QUO3 => 5; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use constant QUO4 => 6; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use constant QUO5 => 7; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | ▶ | use constant QUO6 => 8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use constant QUO7 => 9; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | bless { }, $class; | |||||||||||||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | sub scan { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
scan: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | my($self, $result, $filename, $data) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | $self->_walker($data, $result, $filename); | |||||||||||||||||||||||||||||||||||||||||
| 27 | 1 | return $result; | |||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 1 | ▶ | sub scan_file { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
scan_file: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 31 | 1 | my ($self, $result, $filename) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 32 | 1 | ▶ | open my $fh, '<:encoding(utf-8)', $filename | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | or die "Cannot open file '$filename' for reading: $!"; | ||||||||||||||||||||||||||||||||||||||||||
| 34 | 1 | my $data = do { local $/; <$fh> }; | |||||||||||||||||||||||||||||||||||||||||
| 35 | 1 | return $self->scan($result, $filename, $data); | |||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | # Imported from Locale::Maketext::Extract::Plugin::Perl | ||||||||||||||||||||||||||||||||||||||||||
| 39 | 1 | ▶ | sub _walker { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_walker: called CC=80 SCAR=45.0
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 41 | 1 | local $_ = shift; | |||||||||||||||||||||||||||||||||||||||||
| 42 | 1 | my ($result, $filename) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | 0 | ▶ | local $SIG{__WARN__} = sub { die @_ }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | # Perl code: | ||||||||||||||||||||||||||||||||||||||||||
| 47 | 1 | my ( $state, $line_offset, $str, $str_part, $vars, $quo, $heredoc ) | |||||||||||||||||||||||||||||||||||||||||
| 48 | = ( 0, 0 ); | ||||||||||||||||||||||||||||||||||||||||||
| 49 | 1 | my $orig = 1 + ( () = ( ( my $__ = $_ ) =~ /\n/g ) ); | |||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | PARSER: { | ||||||||||||||||||||||||||||||||||||||||||
| 52 | 1 | ▶ | $_ = substr( $_, pos($_) ) if ( pos($_) ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | 429 | my $line = $orig - ( () = ( ( my $__ = $_ ) =~ /\n/g ) ); | |||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | # various ways to spell the localization function | ||||||||||||||||||||||||||||||||||||||||||
| 56 | $state == NUL | ||||||||||||||||||||||||||||||||||||||||||
| 57 | && m/\b(translate|maketext|gettext|__?|loc(?:ali[sz]e)?|l|x)/gc | ||||||||||||||||||||||||||||||||||||||||||
| 58 | 429 | ▶ | && do { $state = BEG; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 0 and /\b(translate|maketext|gettext|__?|loc(?:ali[sz]e)?|l|x)/cg
MC/DC100%2/2
$state == 0 and /\b(translate|maketext|gettext|__?|loc(?:ali[sz]e)?|l|x)/cg
$state == 0
/\b(translate|maketext|gettext|__?|loc(?:ali[sz]e)?|l|x)/cg
Truth table100%3/3
A and B
A= $state == 0B= /\b(translate|maketext|gettext|__?|loc(?:ali[sz]e)?|l|x)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 59 | 372 | ▶ | $state == BEG && m/^([\s\t\n]*)/gc && redo; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 1 and /^([\s\t\n]*)/cg
MC/DC100%2/2
$state == 1 and /^([\s\t\n]*)/cg
$state == 1
/^([\s\t\n]*)/cg
Truth table100%3/3
A and B
A= $state == 1B= /^([\s\t\n]*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||
| 61 | # begin () | ||||||||||||||||||||||||||||||||||||||||||
| 62 | $state == BEG | ||||||||||||||||||||||||||||||||||||||||||
| 63 | && m/^([\S\(])\s*/gc | ||||||||||||||||||||||||||||||||||||||||||
| 64 | 313 | ▶ | && do { $state = ( ( $1 eq '(' ) ? PAR : NUL ); redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%2/3
$state == 1 and /^([\S\(])\s*/cg
MC/DC50%1/2
$state == 1 and /^([\S\(])\s*/cg
$state == 1
/^([\S\(])\s*/cg
Truth table66%2/3
A and B
A= $state == 1B= /^([\S\(])\s*/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||
| 66 | # concat | ||||||||||||||||||||||||||||||||||||||||||
| 67 | $state == PAR | ||||||||||||||||||||||||||||||||||||||||||
| 68 | && defined($str) | ||||||||||||||||||||||||||||||||||||||||||
| 69 | && m/^(\s*\.\s*)/gc | ||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | && do { $line_offset += ( () = ( ( my $__ = $1 ) =~ /\n/g ) ); redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
$state == 2 and defined $str and /^(\s*\.\s*)/cg
$state == 2 and defined $str
MC/DC0%0/3
$state == 2 and defined $str and /^(\s*\.\s*)/cg
$state == 2
defined $str
/^(\s*\.\s*)/cg
Truth table75%3/4
A and B and C
A= $state == 2B= defined $strC= /^(\s*\.\s*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | # str_part | ||||||||||||||||||||||||||||||||||||||||||
| 73 | 256 | ▶ | $state == PAR && defined($str_part) && do { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and defined $str_part
MC/DC100%2/2
$state == 2 and defined $str_part
$state == 2
defined $str_part
Truth table100%3/3
A and B
A= $state == 2B= defined $str_part
| |||||||||||||||||||||||||||||||||||||||||||
| 74 | 42 | ▶ | if ( ( $quo == QUO1 ) || ( $quo == QUO5 ) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
$quo == 3 or $quo == 7
MC/DC100%2/2
$quo == 3 or $quo == 7
$quo == 3
$quo == 7
Truth table100%3/3
A or B
A= $quo == 3B= $quo == 7
| |||||||||||||||||||||||||||||||||||||||||||
| 75 | 18 | ▶ | $str_part =~ s/\\([\\'])/$1/g | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | if ($str_part); # normalize q strings | ||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||
| 78 | elsif ( $quo != QUO6 ) { | ||||||||||||||||||||||||||||||||||||||||||
| 79 | 23 | ▶ | $str_part =~ s/(\\(?:[0x]..|c?.))/"qq($1)"/eeg | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 80 | if ($str_part); # normalize qq / qx strings | ||||||||||||||||||||||||||||||||||||||||||
| 81 | } | ||||||||||||||||||||||||||||||||||||||||||
| 82 | 42 | $str .= $str_part; | |||||||||||||||||||||||||||||||||||||||||
| 83 | 42 | undef $str_part; | |||||||||||||||||||||||||||||||||||||||||
| 84 | 42 | undef $quo; | |||||||||||||||||||||||||||||||||||||||||
| 85 | 42 | redo; | |||||||||||||||||||||||||||||||||||||||||
| 86 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||
| 88 | # begin or end of string | ||||||||||||||||||||||||||||||||||||||||||
| 89 | 214 | ▶ | $state == PAR && m/^(\')/gc && do { $state = $quo = QUO1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^(\')/cg
MC/DC100%2/2
$state == 2 and /^(\')/cg
$state == 2
/^(\')/cg
Truth table100%3/3
A and B
A= $state == 2B= /^(\')/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 90 | 202 | ▶ | $state == QUO1 && m/^([^'\\]+)/gc && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 3 and /^([^'\\]+)/cg
MC/DC100%2/2
$state == 3 and /^([^'\\]+)/cg
$state == 3
/^([^'\\]+)/cg
Truth table100%3/3
A and B
A= $state == 3B= /^([^'\\]+)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | 182 | ▶ | $state == QUO1 && m/^((?:\\.)+)/gcs && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 3 and /^((?:\\.)+)/cgs
MC/DC100%2/2
$state == 3 and /^((?:\\.)+)/cgs
$state == 3
/^((?:\\.)+)/cgs
Truth table100%3/3
A and B
A= $state == 3B= /^((?:\\.)+)/cgs
| |||||||||||||||||||||||||||||||||||||||||||
| 92 | 174 | ▶ | $state == QUO1 && m/^\'/gc && do { $state = PAR; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 3 and /^\'/cg
MC/DC50%1/2
$state == 3 and /^\'/cg
$state == 3
/^\'/cg
Truth table66%2/3
A and B
A= $state == 3B= /^\'/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||
| 94 | 162 | ▶ | $state == PAR && m/^\"/gc && do { $state = $quo = QUO2; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^\"/cg
MC/DC100%2/2
$state == 2 and /^\"/cg
$state == 2
/^\"/cg
Truth table100%3/3
A and B
A= $state == 2B= /^\"/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | 144 | ▶ | $state == QUO2 && m/^([^"\\]+)/gc && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 4 and /^([^"\\]+)/cg
MC/DC100%2/2
$state == 4 and /^([^"\\]+)/cg
$state == 4
/^([^"\\]+)/cg
Truth table100%3/3
A and B
A= $state == 4B= /^([^"\\]+)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | 118 | ▶ | $state == QUO2 && m/^((?:\\.)+)/gcs && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 4 and /^((?:\\.)+)/cgs
MC/DC100%2/2
$state == 4 and /^((?:\\.)+)/cgs
$state == 4
/^((?:\\.)+)/cgs
Truth table100%3/3
A and B
A= $state == 4B= /^((?:\\.)+)/cgs
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | 108 | ▶ | $state == QUO2 && m/^\"/gc && do { $state = PAR; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 4 and /^\"/cg
MC/DC50%1/2
$state == 4 and /^\"/cg
$state == 4
/^\"/cg
Truth table66%2/3
A and B
A= $state == 4B= /^\"/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | ▶ | $state == PAR && m/^\`/gc && do { $state = $quo = QUO3; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 2 and /^\`/cg
MC/DC0%0/2
$state == 2 and /^\`/cg
$state == 2
/^\`/cg
Truth table66%2/3
A and B
A= $state == 2B= /^\`/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | ▶ | $state == QUO3 && m/^([^\`]*)/gc && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$state == 5 and /^([^\`]*)/cg
MC/DC0%0/2
$state == 5 and /^([^\`]*)/cg
$state == 5
/^([^\`]*)/cg
Truth table33%1/3
A and B
A= $state == 5B= /^([^\`]*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | $state == QUO3 && m/^\`/gc && do { $state = PAR; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$state == 5 and /^\`/cg
MC/DC0%0/2
$state == 5 and /^\`/cg
$state == 5
/^\`/cg
Truth table33%1/3
A and B
A= $state == 5B= /^\`/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||
| 103 | 90 | ▶ | $state == PAR && m/^qq\{/gc && do { $state = $quo = QUO4; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^qq\{/cg
MC/DC100%2/2
$state == 2 and /^qq\{/cg
$state == 2
/^qq\{/cg
Truth table100%3/3
A and B
A= $state == 2B= /^qq\{/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | 89 | ▶ | $state == QUO4 && m/^([^\}]*)/gc && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 6 and /^([^\}]*)/cg
MC/DC100%2/2
$state == 6 and /^([^\}]*)/cg
$state == 6
/^([^\}]*)/cg
Truth table100%3/3
A and B
A= $state == 6B= /^([^\}]*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | 87 | ▶ | $state == QUO4 && m/^\}/gc && do { $state = PAR; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 6 and /^\}/cg
MC/DC50%1/2
$state == 6 and /^\}/cg
$state == 6
/^\}/cg
Truth table66%2/3
A and B
A= $state == 6B= /^\}/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||
| 107 | 86 | ▶ | $state == PAR && m/^q\{/gc && do { $state = $quo = QUO5; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^q\{/cg
MC/DC100%2/2
$state == 2 and /^q\{/cg
$state == 2
/^q\{/cg
Truth table100%3/3
A and B
A= $state == 2B= /^q\{/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 108 | 80 | ▶ | $state == QUO5 && m/^([^\}]*)/gc && do { $str_part .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 7 and /^([^\}]*)/cg
MC/DC100%2/2
$state == 7 and /^([^\}]*)/cg
$state == 7
/^([^\}]*)/cg
Truth table100%3/3
A and B
A= $state == 7B= /^([^\}]*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 109 | 68 | ▶ | $state == QUO5 && m/^\}/gc && do { $state = PAR; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 7 and /^\}/cg
MC/DC50%1/2
$state == 7 and /^\}/cg
$state == 7
/^\}/cg
Truth table66%2/3
A and B
A= $state == 7B= /^\}/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||
| 111 | # find heredoc terminator, then get the | ||||||||||||||||||||||||||||||||||||||||||
| 112 | #heredoc and go back to current position | ||||||||||||||||||||||||||||||||||||||||||
| 113 | $state == PAR | ||||||||||||||||||||||||||||||||||||||||||
| 114 | && m/^<<\s*\'/gc | ||||||||||||||||||||||||||||||||||||||||||
| 115 | 62 | ▶ | && do { $state = $quo = QUO6; $heredoc = ''; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^<<\s*\'/cg
MC/DC100%2/2
$state == 2 and /^<<\s*\'/cg
$state == 2
/^<<\s*\'/cg
Truth table100%3/3
A and B
A= $state == 2B= /^<<\s*\'/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | 61 | ▶ | $state == QUO6 && m/^([^'\\\n]+)/gc && do { $heredoc .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 8 and /^([^'\\\n]+)/cg
MC/DC100%2/2
$state == 8 and /^([^'\\\n]+)/cg
$state == 8
/^([^'\\\n]+)/cg
Truth table100%3/3
A and B
A= $state == 8B= /^([^'\\\n]+)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ▶ | $state == QUO6 && m/^((?:\\.)+)/gc && do { $heredoc .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 8 and /^((?:\\.)+)/cg
MC/DC0%0/2
$state == 8 and /^((?:\\.)+)/cg
$state == 8
/^((?:\\.)+)/cg
Truth table66%2/3
A and B
A= $state == 8B= /^((?:\\.)+)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | $state == QUO6 | ||||||||||||||||||||||||||||||||||||||||||
| 119 | && m/^\'/gc | ||||||||||||||||||||||||||||||||||||||||||
| 120 | 60 | ▶ | && do { $state = HERE; $heredoc =~ s/\\\'/\'/g; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 8 and /^\'/cg
MC/DC50%1/2
$state == 8 and /^\'/cg
$state == 8
/^\'/cg
Truth table66%2/3
A and B
A= $state == 8B= /^\'/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | $state == PAR | ||||||||||||||||||||||||||||||||||||||||||
| 123 | && m/^<<\s*\"/gc | ||||||||||||||||||||||||||||||||||||||||||
| 124 | 59 | ▶ | && do { $state = $quo = QUO7; $heredoc = ''; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^<<\s*\"/cg
MC/DC100%2/2
$state == 2 and /^<<\s*\"/cg
$state == 2
/^<<\s*\"/cg
Truth table100%3/3
A and B
A= $state == 2B= /^<<\s*\"/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | 57 | ▶ | $state == QUO7 && m/^([^"\\\n]+)/gc && do { $heredoc .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 9 and /^([^"\\\n]+)/cg
MC/DC100%2/2
$state == 9 and /^([^"\\\n]+)/cg
$state == 9
/^([^"\\\n]+)/cg
Truth table100%3/3
A and B
A= $state == 9B= /^([^"\\\n]+)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | ▶ | $state == QUO7 && m/^((?:\\.)+)/gc && do { $heredoc .= $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 9 and /^((?:\\.)+)/cg
MC/DC0%0/2
$state == 9 and /^((?:\\.)+)/cg
$state == 9
/^((?:\\.)+)/cg
Truth table66%2/3
A and B
A= $state == 9B= /^((?:\\.)+)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 127 | $state == QUO7 | ||||||||||||||||||||||||||||||||||||||||||
| 128 | && m/^\"/gc | ||||||||||||||||||||||||||||||||||||||||||
| 129 | 56 | ▶ | && do { $state = HERE; $heredoc =~ s/\\\"/\"/g; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 9 and /^\"/cg
MC/DC50%1/2
$state == 9 and /^\"/cg
$state == 9
/^\"/cg
Truth table66%2/3
A and B
A= $state == 9B= /^\"/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | $state == PAR | ||||||||||||||||||||||||||||||||||||||||||
| 132 | && m/^<<(\w*)/gc | ||||||||||||||||||||||||||||||||||||||||||
| 133 | 54 | ▶ | && do { $state = HERE; $quo = QUO7; $heredoc = $1; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^<<(\w*)/cg
MC/DC100%2/2
$state == 2 and /^<<(\w*)/cg
$state == 2
/^<<(\w*)/cg
Truth table100%3/3
A and B
A= $state == 2B= /^<<(\w*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||
| 135 | # jump ahead and get the heredoc, then s/// also | ||||||||||||||||||||||||||||||||||||||||||
| 136 | # resets the pos and we are back at the current pos | ||||||||||||||||||||||||||||||||||||||||||
| 137 | $state == HERE | ||||||||||||||||||||||||||||||||||||||||||
| 138 | && m/^.*\r?\n/gc | ||||||||||||||||||||||||||||||||||||||||||
| 139 | && s/\G(.*?\r?\n)$heredoc(\r?\n)//s | ||||||||||||||||||||||||||||||||||||||||||
| 140 | 51 | ▶ | && do { $state = PAR; $str_part .= $1; $line_offset++; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
$state == 10 and /^.*\r?\n/cg and s/\G(.*?\r?\n)$heredoc(\r?\n)//s
$state == 10 and /^.*\r?\n/cg
MC/DC33%1/3
$state == 10 and /^.*\r?\n/cg and s/\G(.*?\r?\n)$heredoc(\r?\n)//s
$state == 10
/^.*\r?\n/cg
s/\G(.*?\r?\n)$heredoc(\r?\n)//s
Truth table50%2/4
A and B and C
A= $state == 10B= /^.*\r?\n/cgC= s/\G(.*?\r?\n)$heredoc(\r?\n)//s
| |||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | # end () | ||||||||||||||||||||||||||||||||||||||||||
| 143 | # | ||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||
| 145 | 45 | ▶ | $state == PAR && m/^\s*[\)]/gc && do { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$state == 2 and /^\s*[\)]/cg
MC/DC100%2/2
$state == 2 and /^\s*[\)]/cg
$state == 2
/^\s*[\)]/cg
Truth table100%3/3
A and B
A= $state == 2B= /^\s*[\)]/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 146 | 43 | $state = NUL; | |||||||||||||||||||||||||||||||||||||||||
| 147 | 43 | ▶ | $vars =~ s/[\n\r]//g if ($vars); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||
| 149 | 43 | ▶ | if ($str) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 150 | 41 | $result->add_entry_position( $str, $filename, $line - $line_offset ) # <= [MODIFIED] remove mystery line modifier | |||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||
| 152 | 43 | undef $str; | |||||||||||||||||||||||||||||||||||||||||
| 153 | 43 | undef $vars; | |||||||||||||||||||||||||||||||||||||||||
| 154 | 43 | undef $heredoc; | |||||||||||||||||||||||||||||||||||||||||
| 155 | 43 | $line_offset = 0; | |||||||||||||||||||||||||||||||||||||||||
| 156 | 43 | redo; | |||||||||||||||||||||||||||||||||||||||||
| 157 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | # a line of vars | ||||||||||||||||||||||||||||||||||||||||||
| 160 | 2 | ▶ | $state == PAR && m/^([^\)]*)/gc && do { $vars .= "$1\n"; redo }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state == 2 and /^([^\)]*)/cg
MC/DC50%1/2
$state == 2 and /^([^\)]*)/cg
$state == 2
/^([^\)]*)/cg
Truth table66%2/3
A and B
A= $state == 2B= /^([^\)]*)/cg
| |||||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||
| 163 | 1 | return $result; | |||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||||
| 166 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 167 | __END__ | ||||||||||||||||||||||||||||||||||||||||||