| 1 | 61 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 61 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 3 | package YAML::PP::Common; | ||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 61 | our $VERSION = 'v0.41.1'; # TRIAL VERSION | |||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 61 | ▶ | use Exporter 'import'; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 61 | my @p = qw/ | |||||||||||||||||||||||||||||||||||||||||||||
| 10 | PRESERVE_ALL PRESERVE_ORDER PRESERVE_SCALAR_STYLE PRESERVE_FLOW_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 11 | PRESERVE_ALIAS | ||||||||||||||||||||||||||||||||||||||||||||||
| 12 | /; | ||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 61 | my @s = qw/ | |||||||||||||||||||||||||||||||||||||||||||||
| 14 | YAML_ANY_SCALAR_STYLE YAML_PLAIN_SCALAR_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 15 | YAML_SINGLE_QUOTED_SCALAR_STYLE YAML_DOUBLE_QUOTED_SCALAR_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 16 | YAML_LITERAL_SCALAR_STYLE YAML_FOLDED_SCALAR_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 17 | YAML_QUOTED_SCALAR_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||
| 19 | YAML_ANY_SEQUENCE_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 20 | YAML_BLOCK_SEQUENCE_STYLE YAML_FLOW_SEQUENCE_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||
| 22 | YAML_ANY_MAPPING_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 23 | YAML_BLOCK_MAPPING_STYLE YAML_FLOW_MAPPING_STYLE | ||||||||||||||||||||||||||||||||||||||||||||||
| 24 | /; | ||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 61 | our @EXPORT_OK = (@s, @p); | |||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 61 | our %EXPORT_TAGS = ( | |||||||||||||||||||||||||||||||||||||||||||||
| 28 | PRESERVE => [@p], | ||||||||||||||||||||||||||||||||||||||||||||||
| 29 | STYLES => [@s], | ||||||||||||||||||||||||||||||||||||||||||||||
| 30 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 61 | ▶ | use constant { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 61 | YAML_ANY_SCALAR_STYLE => 0, | |||||||||||||||||||||||||||||||||||||||||||||
| 34 | YAML_PLAIN_SCALAR_STYLE => 1, | ||||||||||||||||||||||||||||||||||||||||||||||
| 35 | YAML_SINGLE_QUOTED_SCALAR_STYLE => 2, | ||||||||||||||||||||||||||||||||||||||||||||||
| 36 | YAML_DOUBLE_QUOTED_SCALAR_STYLE => 3, | ||||||||||||||||||||||||||||||||||||||||||||||
| 37 | YAML_LITERAL_SCALAR_STYLE => 4, | ||||||||||||||||||||||||||||||||||||||||||||||
| 38 | YAML_FOLDED_SCALAR_STYLE => 5, | ||||||||||||||||||||||||||||||||||||||||||||||
| 39 | YAML_QUOTED_SCALAR_STYLE => 'Q', # deprecated | ||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||
| 41 | YAML_ANY_SEQUENCE_STYLE => 0, | ||||||||||||||||||||||||||||||||||||||||||||||
| 42 | YAML_BLOCK_SEQUENCE_STYLE => 1, | ||||||||||||||||||||||||||||||||||||||||||||||
| 43 | YAML_FLOW_SEQUENCE_STYLE => 2, | ||||||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||||||
| 45 | YAML_ANY_MAPPING_STYLE => 0, | ||||||||||||||||||||||||||||||||||||||||||||||
| 46 | YAML_BLOCK_MAPPING_STYLE => 1, | ||||||||||||||||||||||||||||||||||||||||||||||
| 47 | YAML_FLOW_MAPPING_STYLE => 2, | ||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||
| 49 | PRESERVE_ORDER => 2, | ||||||||||||||||||||||||||||||||||||||||||||||
| 50 | PRESERVE_SCALAR_STYLE => 4, | ||||||||||||||||||||||||||||||||||||||||||||||
| 51 | PRESERVE_FLOW_STYLE => 8, | ||||||||||||||||||||||||||||||||||||||||||||||
| 52 | PRESERVE_ALIAS => 16, | ||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||
| 54 | PRESERVE_ALL => 31, | ||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 61 | }; | |||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 61 | my %scalar_style_to_string = ( | |||||||||||||||||||||||||||||||||||||||||||||
| 58 | YAML_PLAIN_SCALAR_STYLE() => ':', | ||||||||||||||||||||||||||||||||||||||||||||||
| 59 | YAML_SINGLE_QUOTED_SCALAR_STYLE() => "'", | ||||||||||||||||||||||||||||||||||||||||||||||
| 60 | YAML_DOUBLE_QUOTED_SCALAR_STYLE() => '"', | ||||||||||||||||||||||||||||||||||||||||||||||
| 61 | YAML_LITERAL_SCALAR_STYLE() => '|', | ||||||||||||||||||||||||||||||||||||||||||||||
| 62 | YAML_FOLDED_SCALAR_STYLE() => '>', | ||||||||||||||||||||||||||||||||||||||||||||||
| 63 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 49543 | ▶ | sub event_to_test_suite { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
event_to_test_suite: called CC=21 SCAR=30.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 49543 | my ($event, $args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||
| 68 | 49543 | my $ev = $event->{name}; | |||||||||||||||||||||||||||||||||||||||||||||
| 69 | 49543 | my $string; | |||||||||||||||||||||||||||||||||||||||||||||
| 70 | 49543 | my $content = $event->{value}; | |||||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 49543 | my $properties = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 73 | 49543 | ▶ | $properties .= " &$event->{anchor}" if defined $event->{anchor}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 49543 | ▶ | $properties .= " <$event->{tag}>" if defined $event->{tag}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 49543 | ▶ | if ($ev eq 'document_start_event') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 10 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 4704 | $string = "+DOC"; | |||||||||||||||||||||||||||||||||||||||||||||
| 78 | 4704 | ▶ | $string .= " ---" unless $event->{implicit}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 80 | elsif ($ev eq 'document_end_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 4618 | $string = "-DOC"; | |||||||||||||||||||||||||||||||||||||||||||||
| 82 | 4618 | ▶ | $string .= " ..." unless $event->{implicit}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 84 | elsif ($ev eq 'stream_start_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 4290 | $string = "+STR"; | |||||||||||||||||||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 87 | elsif ($ev eq 'stream_end_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 4194 | $string = "-STR"; | |||||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 90 | elsif ($ev eq 'mapping_start_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 4165 | $string = "+MAP"; | |||||||||||||||||||||||||||||||||||||||||||||
| 92 | 4165 | ▶ | if ($event->{style} and $event->{style} eq YAML_FLOW_MAPPING_STYLE) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$event->{"style"} and $event->{"style"} eq 2
MC/DC50%1/2
$event->{"style"} and $event->{"style"} eq 2
$event->{"style"}
$event->{"style"} eq 2
Truth table66%2/3
A and B
A= $event->{"style"}B= $event->{"style"} eq 2
| |||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 1120 | ▶ | $string .= ' {}' if $args->{flow}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 4165 | $string .= $properties; | |||||||||||||||||||||||||||||||||||||||||||||
| 96 | 4165 | if (0) { | |||||||||||||||||||||||||||||||||||||||||||||
| 97 | # doesn't match yaml-test-suite format | ||||||||||||||||||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 100 | elsif ($ev eq 'sequence_start_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 2726 | $string = "+SEQ"; | |||||||||||||||||||||||||||||||||||||||||||||
| 102 | 2726 | ▶ | if ($event->{style} and $event->{style} eq YAML_FLOW_SEQUENCE_STYLE) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$event->{"style"} and $event->{"style"} eq 2
MC/DC50%1/2
$event->{"style"} and $event->{"style"} eq 2
$event->{"style"}
$event->{"style"} eq 2
Truth table66%2/3
A and B
A= $event->{"style"}B= $event->{"style"} eq 2
| |||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 796 | ▶ | $string .= ' []' if $args->{flow}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 2726 | $string .= $properties; | |||||||||||||||||||||||||||||||||||||||||||||
| 106 | 2726 | if (0) { | |||||||||||||||||||||||||||||||||||||||||||||
| 107 | # doesn't match yaml-test-suite format | ||||||||||||||||||||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 110 | elsif ($ev eq 'mapping_end_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 4114 | $string = "-MAP"; | |||||||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 113 | elsif ($ev eq 'sequence_end_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 2702 | $string = "-SEQ"; | |||||||||||||||||||||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 116 | elsif ($ev eq 'scalar_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 17713 | $string = '=VAL'; | |||||||||||||||||||||||||||||||||||||||||||||
| 118 | 17713 | $string .= $properties; | |||||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 17713 | $content =~ s/\\/\\\\/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 121 | 17713 | $content =~ s/\t/\\t/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 122 | 17713 | $content =~ s/\r/\\r/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 123 | 17713 | $content =~ s/\n/\\n/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 124 | 17713 | $content =~ s/[\b]/\\b/g; | |||||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||||||
| 126 | $string .= ' ' | ||||||||||||||||||||||||||||||||||||||||||||||
| 127 | . $scalar_style_to_string{ $event->{style} } | ||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 17713 | . $content; | |||||||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 130 | elsif ($ev eq 'alias_event') { | ||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 317 | $string = "=ALI *$content"; | |||||||||||||||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 49543 | return $string; | |||||||||||||||||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 30 | ▶ | sub test_suite_to_event { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
test_suite_to_event: called CC=21 SCAR=31.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 30 | my ($str) = @_; | |||||||||||||||||||||||||||||||||||||||||||||
| 138 | 30 | my $event = {}; | |||||||||||||||||||||||||||||||||||||||||||||
| 139 | 30 | ▶ | if ($str =~ s/^\+STR//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 10 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 1 | $event->{name} = 'stream_start_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 142 | elsif ($str =~ s/^\-STR//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 1 | $event->{name} = 'stream_end_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 144 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 145 | elsif ($str =~ s/^\+DOC//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 1 | $event->{name} = 'document_start_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 147 | 1 | ▶ | if ($str =~ s/^ ---//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 1 | $event->{implicit} = 0; | |||||||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 150 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | $event->{implicit} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 154 | elsif ($str =~ s/^\-DOC//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 1 | $event->{name} = 'document_end_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 156 | 1 | ▶ | if ($str =~ s/^ \.\.\.//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | $event->{implicit} = 0; | |||||||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 159 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 1 | $event->{implicit} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 163 | elsif ($str =~ s/^\+SEQ//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 3 | $event->{name} = 'sequence_start_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 165 | 3 | ▶ | if ($str =~ s/^ \&(\S+)//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | $event->{anchor} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 3 | ▶ | if ($str =~ s/^ <(\S+)>//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 1 | $event->{tag} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 172 | elsif ($str =~ s/^\-SEQ//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 3 | $event->{name} = 'sequence_end_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 175 | elsif ($str =~ s/^\+MAP//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 5 | $event->{name} = 'mapping_start_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 177 | 5 | ▶ | if ($str =~ s/^ \&(\S+)//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 1 | $event->{anchor} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 5 | ▶ | if ($str =~ s/^ <(\S+)>//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 2 | $event->{tag} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 184 | elsif ($str =~ s/^\-MAP//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 5 | $event->{name} = 'mapping_end_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 187 | elsif ($str =~ s/^=VAL//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 4 | $event->{name} = 'scalar_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 189 | 4 | ▶ | if ($str =~ s/^ <(\S+)>//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 1 | $event->{tag} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 4 | ▶ | if ($str =~ s/^ [:'">|]//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 4 | $event->{style} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 4 | ▶ | if ($str =~ s/^(.*)//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 4 | $event->{value} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 198 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 199 | elsif ($str =~ s/^=ALI//) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 6 | $event->{name} = 'alias_event'; | |||||||||||||||||||||||||||||||||||||||||||||
| 201 | 6 | ▶ | if ($str =~ s/^ \*(.*)//) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 6 | $event->{value} = $1; | |||||||||||||||||||||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 205 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | die "Could not parse event '$str'"; | |||||||||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 30 | return $event; | |||||||||||||||||||||||||||||||||||||||||||||
| 209 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 61 | 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||||||
| 214 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||