blib/lib/WebForms.pm

filter: Statementstmt 31.4% 740 / 2352 Branchbran 0.0% 0 / 964 Conditioncond 0.0% 0 / 254 MC/DCmcdc 0.0% 0 / 146 Subroutinesub 34.4% 249 / 722 Podpod 0.0% 0 / 381 totaltotal 20.5% 989 / 4819 CC 572 SCAR 30.9
CC
572
Cov
21%
confirm_is_true_accept
182.0
confirm_is_false_accept
182.0
assign_confirm_event
132.0
CRAP 21.9
↑ Summary
1 ÿþ# WebForms.pm 2.2 - The Back-End Part of WebForms Core Technology, Owned by Elanat (https://elanat.net)
2 # Compatible with WebFormsJS version 2.2
3
4 package WebForms;
5 1 our $VERSION = '2.2.0';
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
9
10 1 ▶use constant GS => chr(29);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use constant US => chr(31);
Subroutine BEGIN: called CC=1 SCAR=0.0
12
13 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
14 0 my ($class) = @_;
15 0 my $self = {
16 web_forms_data => "",
17 };
18 0 bless $self, $class;
19 0 return $self;
20 }
21
22 0 ▶sub _add {
Subroutine _add: not called CC=4 SCAR=30.0
23 0 my ($self, $name, $value) = @_;
24 0 ▶ if (length($self->{web_forms_data}) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $self->{"web_forms_data"} > 0) 0 0 0
25 0 $self->{web_forms_data} .= "\n";
26 }
27 0 $self->{web_forms_data} .= $name;
28 0 ▶ if (@_ > 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ > 2) 0 0 0
29 0 ▶ $self->{web_forms_data} .= "=" . (defined $value ? $value : "");
Branch: 1 branch
BranchTrueFalseTotal
defined $value ? : 0 0 0
30 }
31 }
32
33 0 ▶sub _add_to_up {
Subroutine _add_to_up: not called CC=3 SCAR=24.8
34 0 my ($self, $name, $value) = @_;
35 0 ▶ my $line = defined $value ? "$name=$value" : $name;
Branch: 1 branch
BranchTrueFalseTotal
defined $value ? : 0 0 0
36 0 ▶ if (length($self->{web_forms_data}) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $self->{"web_forms_data"} > 0) 0 0 0
37 0 $line .= "\n";
38 }
39 0 $self->{web_forms_data} = $line . $self->{web_forms_data};
40 }
41
42 0 ▶sub _get_line_by_index {
Subroutine _get_line_by_index: not called CC=5 SCAR=34.0
43 0 my ($self, $index) = @_;
44 0 ▶ return "" if length($self->{web_forms_data}) == 0;
Branch: 1 branch
BranchTrueFalseTotal
if length $self->{"web_forms_data"} == 0 0 0 0
45 0 my @lines = split(/\n/, $self->{web_forms_data}, -1);
46 0 ▶ $index = scalar(@lines) + $index if $index < 0;
Branch: 1 branch
BranchTrueFalseTotal
if $index < 0 0 0 0
47 0 ▶ return "" if $index < 0 || $index >= scalar(@lines);
Branch: 1 branch
BranchTrueFalseTotal
if $index < 0 or $index >= scalar @lines 0 0 0
Condition0%0/3
$index < 0 or $index >= scalar @lines
l!l&&r!l&&!r
000
MC/DC0%0/2
$index < 0 or $index >= scalar @lines
$index < 0 $index >= scalar @lines
Truth table0%0/3
A or B
A= $index < 0B= $index >= scalar @lines
ABresult
1X1
011
000
48 0 return $lines[$index];
49 }
50
51 0 ▶sub _update_line_by_index {
Subroutine _update_line_by_index: not called CC=7 SCAR=40.3
52 0 my ($self, $index, $name, $value) = @_;
53 0 ▶ return if length($self->{web_forms_data}) == 0;
Branch: 1 branch
BranchTrueFalseTotal
if length $self->{"web_forms_data"} == 0 0 0 0
54 0 my @lines = split(/\n/, $self->{web_forms_data}, -1);
55 0 ▶ $index = scalar(@lines) + $index if $index < 0;
Branch: 1 branch
BranchTrueFalseTotal
if $index < 0 0 0 0
56 0 ▶ return if $index < 0 || $index >= scalar(@lines);
Branch: 1 branch
BranchTrueFalseTotal
if $index < 0 or $index >= scalar @lines 0 0 0
Condition0%0/3
$index < 0 or $index >= scalar @lines
l!l&&r!l&&!r
000
MC/DC0%0/2
$index < 0 or $index >= scalar @lines
$index < 0 $index >= scalar @lines
Truth table0%0/3
A or B
A= $index < 0B= $index >= scalar @lines
ABresult
1X1
011
000
57 0 ▶ $lines[$index] = $name . (!defined($value) || $value eq '' ? "" : "=" . $value);
Branch: 1 branch
BranchTrueFalseTotal
!defined($value) || $value eq '' ? : 0 0 0
Condition0%0/3
not defined $value or $value eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $value or $value eq ""
not defined $value $value eq ""
Truth table0%0/3
not(A) or B
A= not defined $valueB= $value eq ""
ABresult
1X1
011
000
58 0 $self->{web_forms_data} = join("\n", @lines);
59 }
60
61 # For Extension
62 0 ▶sub add_line {
Subroutine add_line: not called CC=1 SCAR=6.9
Pod undocumented
63 0 my ($self, $name, $value) = @_;
64 0 $self->_add($name, $value);
65 }
66
67 # Add
68 # Creates the Data if it does not exist; otherwise, Appends the New Value to the Existing Value.
69 0 ▶sub add_id {
Subroutine add_id: not called CC=1 SCAR=6.9
Pod undocumented
70 0 my ($self, $input_place, $id) = @_;
71 0 $self->_add("ai" . $input_place, $id);
72 }
73
74 0 ▶sub add_name {
Subroutine add_name: not called CC=1 SCAR=6.9
Pod undocumented
75 0 my ($self, $input_place, $name) = @_;
76 0 $self->_add("an" . $input_place, $name);
77 }
78
79 0 ▶sub add_value {
Subroutine add_value: not called CC=1 SCAR=6.9
Pod undocumented
80 0 my ($self, $input_place, $value) = @_;
81 0 $self->_add("av" . $input_place, $value);
82 }
83
84 0 ▶sub add_class {
Subroutine add_class: not called CC=1 SCAR=6.9
Pod undocumented
85 0 my ($self, $input_place, $class) = @_;
86 0 $self->_add("ac" . $input_place, $class);
87 }
88
89 0 ▶sub add_style {
Subroutine add_style: not called CC=2 SCAR=17.9
Pod undocumented
90 0 my ($self, $input_place, $name_or_style, $value) = @_;
91 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
92 0 $self->_add("as" . $input_place, $name_or_style);
93 } else {
94 0 $self->_add("as" . $input_place, $name_or_style . ':' . $value);
95 }
96 }
97
98 0 ▶sub add_option_tag {
Subroutine add_option_tag: not called CC=3 SCAR=24.8
Pod undocumented
99 0 my ($self, $input_place, $text, $value, $selected) = @_;
100 0 ▶ $selected = 0 if !defined $selected;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $selected 0 0 0
101 0 ▶ $self->_add("ao" . $input_place, $value . GS . $text . ($selected ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$selected ? : 0 0 0
102 }
103
104 0 ▶sub add_check_box_tag {
Subroutine add_check_box_tag: not called CC=3 SCAR=24.8
Pod undocumented
105 0 my ($self, $input_place, $text, $value, $checked) = @_;
106 0 ▶ $checked = 0 if !defined $checked;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $checked 0 0 0
107 0 ▶ $self->_add("ak" . $input_place, $value . GS . $text . ($checked ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 0 0 0
108 }
109
110 0 ▶sub add_title {
Subroutine add_title: not called CC=1 SCAR=6.9
Pod undocumented
111 0 my ($self, $input_place, $title) = @_;
112 0 $self->_add("al" . $input_place, $title);
113 }
114
115 0 ▶sub add_label {
Subroutine add_label: not called CC=1 SCAR=6.9
Pod undocumented
116 0 my ($self, $input_place, $label) = @_;
117 0 $self->_add("aA" . $input_place, $label);
118 }
119
120 0 ▶sub add_text {
Subroutine add_text: not called CC=1 SCAR=6.9
Pod undocumented
121 0 my ($self, $input_place, $text) = @_;
122 0 $text =~ s/\n/\$[ln];/g;
123 0 $self->_add("at" . $input_place, $text);
124 }
125
126 0 ▶sub add_text_to_up {
Subroutine add_text_to_up: not called CC=1 SCAR=6.9
Pod undocumented
127 0 my ($self, $input_place, $text) = @_;
128 0 $text =~ s/\n/\$[ln];/g;
129 0 $self->_add("pt" . $input_place, $text);
130 }
131
132 0 ▶sub add_attribute {
Subroutine add_attribute: not called CC=5 SCAR=34.0
Pod undocumented
133 0 my ($self, $input_place, $attribute, $value, $splitter) = @_;
134 0 ▶ $value = "" if !defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 0 0 0
135 0 ▶ $splitter = "\0" if !defined $splitter;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $splitter 0 0 0
136 0 ▶ my $splitter_str = ($splitter ne "\0") ? $splitter : "";
Branch: 1 branch
BranchTrueFalseTotal
$splitter ne "\000" ? : 0 0 0
137 0 ▶ my $value_part = ($value ne "") ? GS . $value : "";
Branch: 1 branch
BranchTrueFalseTotal
$value ne '' ? : 0 0 0
138 0 $self->_add("aa" . $input_place, $attribute . GS . $splitter_str . $value_part);
139 }
140
141 0 ▶sub add_tag {
Subroutine add_tag: not called CC=3 SCAR=24.8
Pod undocumented
142 0 my ($self, $input_place, $tag_name, $id) = @_;
143 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
144 0 ▶ my $id_part = ($id ne "") ? GS . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
145 0 $self->_add("nt" . $input_place, $tag_name . $id_part);
146 }
147
148 0 ▶sub add_tag_to_up {
Subroutine add_tag_to_up: not called CC=3 SCAR=24.8
Pod undocumented
149 0 my ($self, $input_place, $tag_name, $id) = @_;
150 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
151 0 ▶ my $id_part = ($id ne "") ? GS . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
152 0 $self->_add("ut" . $input_place, $tag_name . $id_part);
153 }
154
155 0 ▶sub add_tag_before {
Subroutine add_tag_before: not called CC=3 SCAR=24.8
Pod undocumented
156 0 my ($self, $input_place, $tag_name, $id) = @_;
157 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
158 0 ▶ my $id_part = ($id ne "") ? GS . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
159 0 $self->_add("bt" . $input_place, $tag_name . $id_part);
160 }
161
162 0 ▶sub add_tag_after {
Subroutine add_tag_after: not called CC=3 SCAR=24.8
Pod undocumented
163 0 my ($self, $input_place, $tag_name, $id) = @_;
164 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
165 0 ▶ my $id_part = ($id ne "") ? GS . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
166 0 $self->_add("ft" . $input_place, $tag_name . $id_part);
167 }
168
169 0 ▶sub add_hidden {
Subroutine add_hidden: not called CC=3 SCAR=24.8
Pod undocumented
170 0 my ($self, $input_place, $name, $value, $id) = @_;
171 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
172 0 ▶ my $id_part = ($id ne "") ? GS . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
173 0 $self->_add("ah" . $input_place, $name . GS . $value . $id_part);
174 }
175
176 # Set
177 # Creates the Data if it does not exist; otherwise, Replaces the Existing Value with the New Value.
178 0 ▶sub set_id {
Subroutine set_id: not called CC=1 SCAR=6.9
Pod undocumented
179 0 my ($self, $input_place, $id) = @_;
180 0 $self->_add("si" . $input_place, $id);
181 }
182
183 0 ▶sub set_name {
Subroutine set_name: not called CC=1 SCAR=6.9
Pod undocumented
184 0 my ($self, $input_place, $name) = @_;
185 0 $self->_add("sn" . $input_place, $name);
186 }
187
188 0 ▶sub set_value {
Subroutine set_value: not called CC=1 SCAR=6.9
Pod undocumented
189 0 my ($self, $input_place, $value) = @_;
190 0 $self->_add("sv" . $input_place, $value);
191 }
192
193 0 ▶sub set_class {
Subroutine set_class: not called CC=1 SCAR=6.9
Pod undocumented
194 0 my ($self, $input_place, $class) = @_;
195 0 $self->_add("sc" . $input_place, $class);
196 }
197
198 0 ▶sub set_style {
Subroutine set_style: not called CC=2 SCAR=17.9
Pod undocumented
199 0 my ($self, $input_place, $name_or_style, $value) = @_;
200 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
201 0 $self->_add("ss" . $input_place, $name_or_style);
202 } else {
203 0 $self->_add("ss" . $input_place, $name_or_style . ':' . $value);
204 }
205 }
206
207 0 ▶sub set_option_tag {
Subroutine set_option_tag: not called CC=3 SCAR=24.8
Pod undocumented
208 0 my ($self, $input_place, $text, $value, $selected) = @_;
209 0 ▶ $selected = 0 if !defined $selected;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $selected 0 0 0
210 0 ▶ $self->_add("so" . $input_place, $value . GS . $text . ($selected ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$selected ? : 0 0 0
211 }
212
213 0 ▶sub set_checked {
Subroutine set_checked: not called CC=3 SCAR=24.8
Pod undocumented
214 0 my ($self, $input_place, $checked) = @_;
215 0 ▶ $checked = 0 if !defined $checked;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $checked 0 0 0
216 0 ▶ $self->_add("sk" . $input_place, $checked ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 0 0 0
217 }
218
219 0 ▶sub set_check_box_tag {
Subroutine set_check_box_tag: not called CC=3 SCAR=24.8
Pod undocumented
220 0 my ($self, $input_place, $text, $value, $checked) = @_;
221 0 ▶ $checked = 0 if !defined $checked;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $checked 0 0 0
222 0 ▶ $self->_add("sk" . $input_place, $value . GS . $text . ($checked ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 0 0 0
223 }
224
225 0 ▶sub set_title {
Subroutine set_title: not called CC=1 SCAR=6.9
Pod undocumented
226 0 my ($self, $input_place, $title) = @_;
227 0 $self->_add("sl" . $input_place, $title);
228 }
229
230 0 ▶sub set_label {
Subroutine set_label: not called CC=1 SCAR=6.9
Pod undocumented
231 0 my ($self, $input_place, $label) = @_;
232 0 $self->_add("sA" . $input_place, $label);
233 }
234
235 0 ▶sub set_text {
Subroutine set_text: not called CC=1 SCAR=6.9
Pod undocumented
236 0 my ($self, $input_place, $text) = @_;
237 0 $text =~ s/\n/\$[ln];/g;
238 0 $self->_add("st" . $input_place, $text);
239 }
240
241 0 ▶sub set_attribute {
Subroutine set_attribute: not called CC=3 SCAR=24.8
Pod undocumented
242 0 my ($self, $input_place, $attribute, $value) = @_;
243 0 ▶ $value = "" if !defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 0 0 0
244 0 ▶ my $value_part = ($value ne "") ? GS . $value : "";
Branch: 1 branch
BranchTrueFalseTotal
$value ne '' ? : 0 0 0
245 0 $self->_add("sa" . $input_place, $attribute . GS . $value_part);
246 }
247
248 0 ▶sub set_width {
Subroutine set_width: not called CC=2 SCAR=17.9
Pod undocumented
249 0 my ($self, $input_place, $width) = @_;
250 0 ▶ my $final_width = ($width =~ /^-?\d+$/) ? "${width}px" : $width;
Branch: 1 branch
BranchTrueFalseTotal
$width =~ /^-?\d+$/u ? : 0 0 0
251 0 $self->_add("sw" . $input_place, $final_width);
252 }
253
254 0 ▶sub set_height {
Subroutine set_height: not called CC=2 SCAR=17.9
Pod undocumented
255 0 my ($self, $input_place, $height) = @_;
256 0 ▶ my $final_height = ($height =~ /^-?\d+$/) ? "${height}px" : $height;
Branch: 1 branch
BranchTrueFalseTotal
$height =~ /^-?\d+$/u ? : 0 0 0
257 0 $self->_add("sh" . $input_place, $final_height);
258 }
259
260 0 ▶sub set_background_color {
Subroutine set_background_color: not called CC=1 SCAR=6.9
Pod undocumented
261 0 my ($self, $input_place, $color) = @_;
262 0 $self->_add("bc" . $input_place, $color);
263 }
264
265 0 ▶sub set_text_color {
Subroutine set_text_color: not called CC=1 SCAR=6.9
Pod undocumented
266 0 my ($self, $input_place, $color) = @_;
267 0 $self->_add("tc" . $input_place, $color);
268 }
269
270 0 ▶sub set_font_name {
Subroutine set_font_name: not called CC=1 SCAR=6.9
Pod undocumented
271 0 my ($self, $input_place, $name) = @_;
272 0 $self->_add("fn" . $input_place, $name);
273 }
274
275 0 ▶sub set_font_size {
Subroutine set_font_size: not called CC=2 SCAR=17.9
Pod undocumented
276 0 my ($self, $input_place, $size) = @_;
277 0 ▶ my $final_size = ($size =~ /^-?\d+$/) ? "${size}px" : $size;
Branch: 1 branch
BranchTrueFalseTotal
$size =~ /^-?\d+$/u ? : 0 0 0
278 0 $self->_add("fs" . $input_place, $final_size);
279 }
280
281 0 ▶sub set_font_bold {
Subroutine set_font_bold: not called CC=2 SCAR=17.9
Pod undocumented
282 0 my ($self, $input_place, $bold) = @_;
283 0 ▶ $self->_add("fb" . $input_place, $bold ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$bold ? : 0 0 0
284 }
285
286 0 ▶sub set_visible {
Subroutine set_visible: not called CC=2 SCAR=17.9
Pod undocumented
287 0 my ($self, $input_place, $visible) = @_;
288 0 ▶ $self->_add("vi" . $input_place, $visible ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$visible ? : 0 0 0
289 }
290
291 0 ▶sub set_text_align {
Subroutine set_text_align: not called CC=1 SCAR=6.9
Pod undocumented
292 0 my ($self, $input_place, $align) = @_;
293 0 $self->_add("ta" . $input_place, $align);
294 }
295
296 0 ▶sub set_read_only {
Subroutine set_read_only: not called CC=2 SCAR=17.9
Pod undocumented
297 0 my ($self, $input_place, $read_only) = @_;
298 0 ▶ $self->_add("sr" . $input_place, $read_only ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$read_only ? : 0 0 0
299 }
300
301 0 ▶sub set_disabled {
Subroutine set_disabled: not called CC=2 SCAR=17.9
Pod undocumented
302 0 my ($self, $input_place, $disabled) = @_;
303 0 ▶ $self->_add("sd" . $input_place, $disabled ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$disabled ? : 0 0 0
304 }
305
306 0 ▶sub set_focus {
Subroutine set_focus: not called CC=2 SCAR=17.9
Pod undocumented
307 0 my ($self, $input_place, $focus) = @_;
308 0 ▶ $self->_add("sf" . $input_place, $focus ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$focus ? : 0 0 0
309 }
310
311 0 ▶sub set_min_length {
Subroutine set_min_length: not called CC=1 SCAR=6.9
Pod undocumented
312 0 my ($self, $input_place, $length) = @_;
313 0 $self->_add("mn" . $input_place, "$length");
314 }
315
316 0 ▶sub set_max_length {
Subroutine set_max_length: not called CC=1 SCAR=6.9
Pod undocumented
317 0 my ($self, $input_place, $length) = @_;
318 0 $self->_add("mx" . $input_place, "$length");
319 }
320
321 0 ▶sub set_selected_value {
Subroutine set_selected_value: not called CC=1 SCAR=6.9
Pod undocumented
322 0 my ($self, $input_place, $value) = @_;
323 0 $self->_add("ts" . $input_place, $value);
324 }
325
326 0 ▶sub set_selected_index {
Subroutine set_selected_index: not called CC=1 SCAR=6.9
Pod undocumented
327 0 my ($self, $input_place, $index) = @_;
328 0 $self->_add("ti" . $input_place, "$index");
329 }
330
331 0 ▶sub set_checked_value {
Subroutine set_checked_value: not called CC=2 SCAR=17.9
Pod undocumented
332 0 my ($self, $input_place, $value, $checked) = @_;
333 0 ▶ $self->_add("ks" . $input_place, $value . GS . ($checked ? "1" : "0"));
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 0 0 0
334 }
335
336 0 ▶sub set_checked_index {
Subroutine set_checked_index: not called CC=2 SCAR=17.9
Pod undocumented
337 0 my ($self, $input_place, $index, $checked) = @_;
338 0 ▶ $self->_add("ki" . $input_place, "$index" . GS . ($checked ? "1" : "0"));
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 0 0 0
339 }
340
341 0 ▶sub set_custom_validity {
Subroutine set_custom_validity: not called CC=1 SCAR=6.9
Pod undocumented
342 0 my ($self, $input_place, $text) = @_;
343 0 $text =~ s/\n/\$[ln];/g;
344 0 $self->_add("cv" . $input_place, $text);
345 }
346
347 # Insert
348 # Creates the Data only if it does not exist; otherwise, does nothing.
349 0 ▶sub insert_id {
Subroutine insert_id: not called CC=1 SCAR=6.9
Pod undocumented
350 0 my ($self, $input_place, $id) = @_;
351 0 $self->_add("ii" . $input_place, $id);
352 }
353
354 0 ▶sub insert_name {
Subroutine insert_name: not called CC=1 SCAR=6.9
Pod undocumented
355 0 my ($self, $input_place, $name) = @_;
356 0 $self->_add("in" . $input_place, $name);
357 }
358
359 0 ▶sub insert_value {
Subroutine insert_value: not called CC=1 SCAR=6.9
Pod undocumented
360 0 my ($self, $input_place, $value) = @_;
361 0 $self->_add("iv" . $input_place, $value);
362 }
363
364 0 ▶sub insert_class {
Subroutine insert_class: not called CC=1 SCAR=6.9
Pod undocumented
365 0 my ($self, $input_place, $class) = @_;
366 0 $self->_add("ic" . $input_place, $class);
367 }
368
369 0 ▶sub insert_style {
Subroutine insert_style: not called CC=2 SCAR=17.9
Pod undocumented
370 0 my ($self, $input_place, $name_or_style, $value) = @_;
371 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
372 0 $self->_add("is" . $input_place, $name_or_style);
373 } else {
374 0 $self->_add("is" . $input_place, $name_or_style . ':' . $value);
375 }
376 }
377
378 0 ▶sub insert_option_tag {
Subroutine insert_option_tag: not called CC=3 SCAR=24.8
Pod undocumented
379 0 my ($self, $input_place, $text, $value, $selected) = @_;
380 0 ▶ $selected = 0 if !defined $selected;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $selected 0 0 0
381 0 ▶ $self->_add("io" . $input_place, $value . GS . $text . ($selected ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$selected ? : 0 0 0
382 }
383
384 0 ▶sub insert_check_box_tag {
Subroutine insert_check_box_tag: not called CC=3 SCAR=24.8
Pod undocumented
385 0 my ($self, $input_place, $text, $value, $checked) = @_;
386 0 ▶ $checked = 0 if !defined $checked;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $checked 0 0 0
387 0 ▶ $self->_add("ik" . $input_place, $value . GS . $text . ($checked ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 0 0 0
388 }
389
390 0 ▶sub insert_title {
Subroutine insert_title: not called CC=1 SCAR=6.9
Pod undocumented
391 0 my ($self, $input_place, $title) = @_;
392 0 $self->_add("il" . $input_place, $title);
393 }
394
395 0 ▶sub insert_label {
Subroutine insert_label: not called CC=1 SCAR=6.9
Pod undocumented
396 0 my ($self, $input_place, $label) = @_;
397 0 $self->_add("iA" . $input_place, $label);
398 }
399
400 0 ▶sub insert_text {
Subroutine insert_text: not called CC=1 SCAR=6.9
Pod undocumented
401 0 my ($self, $input_place, $text) = @_;
402 0 $text =~ s/\n/\$[ln];/g;
403 0 $self->_add("it" . $input_place, $text);
404 }
405
406 0 ▶sub insert_attribute {
Subroutine insert_attribute: not called CC=5 SCAR=34.0
Pod undocumented
407 0 my ($self, $input_place, $attribute, $value, $splitter) = @_;
408 0 ▶ $value = "" if !defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 0 0 0
409 0 ▶ $splitter = "\0" if !defined $splitter;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $splitter 0 0 0
410 0 ▶ my $splitter_str = ($splitter ne "\0") ? $splitter : "";
Branch: 1 branch
BranchTrueFalseTotal
$splitter ne "\000" ? : 0 0 0
411 0 ▶ my $value_part = ($value ne "") ? GS . $value : "";
Branch: 1 branch
BranchTrueFalseTotal
$value ne '' ? : 0 0 0
412 0 $self->_add("ia" . $input_place, $attribute . GS . $splitter_str . $value_part);
413 }
414
415 # Delete
416 0 ▶sub delete_id {
Subroutine delete_id: not called CC=1 SCAR=6.9
Pod undocumented
417 0 my ($self, $input_place) = @_;
418 0 $self->_add("di" . $input_place);
419 }
420
421 0 ▶sub delete_name {
Subroutine delete_name: not called CC=1 SCAR=6.9
Pod undocumented
422 0 my ($self, $input_place) = @_;
423 0 $self->_add("dn" . $input_place);
424 }
425
426 0 ▶sub delete_value {
Subroutine delete_value: not called CC=1 SCAR=6.9
Pod undocumented
427 0 my ($self, $input_place) = @_;
428 0 $self->_add("dv" . $input_place);
429 }
430
431 0 ▶sub delete_class {
Subroutine delete_class: not called CC=1 SCAR=6.9
Pod undocumented
432 0 my ($self, $input_place, $class_name) = @_;
433 0 $self->_add("dc" . $input_place, $class_name);
434 }
435
436 0 ▶sub delete_style {
Subroutine delete_style: not called CC=1 SCAR=6.9
Pod undocumented
437 0 my ($self, $input_place, $style_name) = @_;
438 0 $self->_add("ds" . $input_place, $style_name);
439 }
440
441 0 ▶sub delete_option_tag {
Subroutine delete_option_tag: not called CC=1 SCAR=6.9
Pod undocumented
442 0 my ($self, $input_place, $value) = @_;
443 0 $self->_add("do" . $input_place, $value);
444 }
445
446 0 ▶sub delete_all_option_tag {
Subroutine delete_all_option_tag: not called CC=1 SCAR=6.9
Pod undocumented
447 0 my ($self, $input_place) = @_;
448 0 $self->_add("do" . $input_place, "*");
449 }
450
451 0 ▶sub delete_check_box_tag {
Subroutine delete_check_box_tag: not called CC=1 SCAR=6.9
Pod undocumented
452 0 my ($self, $input_place, $value) = @_;
453 0 $self->_add("dk" . $input_place, $value);
454 }
455
456 0 ▶sub delete_all_check_box_tag {
Subroutine delete_all_check_box_tag: not called CC=1 SCAR=6.9
Pod undocumented
457 0 my ($self, $input_place) = @_;
458 0 $self->_add("dk" . $input_place, "*");
459 }
460
461 0 ▶sub delete_title {
Subroutine delete_title: not called CC=1 SCAR=6.9
Pod undocumented
462 0 my ($self, $input_place) = @_;
463 0 $self->_add("dl" . $input_place);
464 }
465
466 0 ▶sub delete_label {
Subroutine delete_label: not called CC=1 SCAR=6.9
Pod undocumented
467 0 my ($self, $input_place) = @_;
468 0 $self->_add("dA" . $input_place);
469 }
470
471 0 ▶sub delete_text {
Subroutine delete_text: not called CC=1 SCAR=6.9
Pod undocumented
472 0 my ($self, $input_place) = @_;
473 0 $self->_add("dt" . $input_place);
474 }
475
476 0 ▶sub delete_attribute {
Subroutine delete_attribute: not called CC=1 SCAR=6.9
Pod undocumented
477 0 my ($self, $input_place, $attribute) = @_;
478 0 $self->_add("da" . $input_place, $attribute);
479 }
480
481 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod undocumented
482 0 my ($self, $input_place) = @_;
483 0 $self->_add("de" . $input_place);
484 }
485
486 0 ▶sub delete_parent {
Subroutine delete_parent: not called CC=1 SCAR=6.9
Pod undocumented
487 0 my ($self, $input_place) = @_;
488 0 $self->_add("dp" . $input_place);
489 }
490
491 # Tag Transformation
492 0 ▶sub swap_tag {
Subroutine swap_tag: not called CC=1 SCAR=6.9
Pod undocumented
493 0 my ($self, $input_place, $output_place) = @_;
494 0 $self->_add("sp" . $input_place, $output_place);
495 }
496
497 0 ▶sub set_reflect {
Subroutine set_reflect: not called CC=1 SCAR=6.9
Pod undocumented
498 0 my ($self, $input_place, $tag) = @_;
499 0 $self->_add("sR" . $input_place, $tag);
500 }
501
502 0 ▶sub set_reflect_by_output_place {
Subroutine set_reflect_by_output_place: not called CC=1 SCAR=6.9
Pod undocumented
503 0 my ($self, $input_place, $output_place) = @_;
504 0 $self->_add("iR" . $input_place, $output_place);
505 }
506
507 0 ▶sub set_morph {
Subroutine set_morph: not called CC=1 SCAR=6.9
Pod undocumented
508 0 my ($self, $input_place, $tag) = @_;
509 0 $self->_add("sM" . $input_place, $tag);
510 }
511
512 0 ▶sub set_morph_by_output_place {
Subroutine set_morph_by_output_place: not called CC=1 SCAR=6.9
Pod undocumented
513 0 my ($self, $input_place, $output_place) = @_;
514 0 $self->_add("iM" . $input_place, $output_place);
515 }
516
517 # The Snapshot and Rollback Mechanism is Sensitive to DOM Changes; It is Recommended to Assign a Stable ID to the Selected Element.
518 # InputPlace: Only One Tag
519
520 0 ▶sub snapshot {
Subroutine snapshot: not called CC=5 SCAR=34.0
Pod undocumented
521 0 my ($self, $input_place, $key, $permanent) = @_;
522 0 ▶ $key = "" unless defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
523 0 ▶ $permanent = 0 unless defined $permanent;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $permanent 0 0 0
524
525 0 ▶ my $key_part = ($key ne "") ? $key : $input_place;
Branch: 1 branch
BranchTrueFalseTotal
$key ne '' ? : 0 0 0
526 0 ▶ my $perm_part = $permanent ? GS . "1" : "";
Branch: 1 branch
BranchTrueFalseTotal
$permanent ? : 0 0 0
527
528 0 $self->_add("rS" . $input_place, $key_part . $perm_part);
529 }
530
531 0 ▶sub rollback {
Subroutine rollback: not called CC=5 SCAR=34.0
Pod undocumented
532 0 my ($self, $input_place, $key, $permanent) = @_;
533 0 ▶ $key = "" unless defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
534 0 ▶ $permanent = 0 unless defined $permanent;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $permanent 0 0 0
535
536 0 ▶ my $key_part = ($key ne "") ? $key : $input_place;
Branch: 1 branch
BranchTrueFalseTotal
$key ne '' ? : 0 0 0
537 0 ▶ my $perm_part = $permanent ? GS . "1" : "";
Branch: 1 branch
BranchTrueFalseTotal
$permanent ? : 0 0 0
538
539 0 $self->_add("rB" . $input_place, $key_part . $perm_part);
540 }
541
542 # Browser
543 0 ▶sub change_url {
Subroutine change_url: not called CC=1 SCAR=6.9
Pod undocumented
544 0 my ($self, $url) = @_;
545 0 $self->_add("cu", $url);
546 }
547
548 0 ▶sub set_head_title {
Subroutine set_head_title: not called CC=1 SCAR=6.9
Pod undocumented
549 0 my ($self, $title) = @_;
550 0 $self->_add("ht", $title);
551 }
552
553 0 ▶sub clipboard_write_text {
Subroutine clipboard_write_text: not called CC=1 SCAR=6.9
Pod undocumented
554 0 my ($self, $text) = @_;
555 0 $self->_add("nw", $text);
556 }
557
558 0 ▶sub scroll_to {
Subroutine scroll_to: not called CC=1 SCAR=6.9
Pod undocumented
559 0 my ($self, $x, $y) = @_;
560 0 $self->_add("ws", "$x" . GS . "$y");
561 }
562
563 0 ▶sub history_go {
Subroutine history_go: not called CC=1 SCAR=6.9
Pod undocumented
564 0 my ($self, $steps) = @_;
565 0 $self->_add("wg", "$steps");
566 }
567
568 0 ▶sub reload_page {
Subroutine reload_page: not called CC=1 SCAR=6.9
Pod undocumented
569 0 my ($self) = @_;
570 0 $self->_add("lr");
571 }
572
573 0 ▶sub redirect {
Subroutine redirect: not called CC=1 SCAR=6.9
Pod undocumented
574 0 my ($self, $path) = @_;
575 0 $self->_add("lh", $path);
576 }
577
578 # Increase
579 0 ▶sub increase_min_length {
Subroutine increase_min_length: not called CC=1 SCAR=6.9
Pod undocumented
580 0 my ($self, $input_place, $value) = @_;
581 0 $self->_add("+n" . $input_place, "$value");
582 }
583
584 0 ▶sub increase_max_length {
Subroutine increase_max_length: not called CC=1 SCAR=6.9
Pod undocumented
585 0 my ($self, $input_place, $value) = @_;
586 0 $self->_add("+x" . $input_place, "$value");
587 }
588
589 0 ▶sub increase_font_size {
Subroutine increase_font_size: not called CC=1 SCAR=6.9
Pod undocumented
590 0 my ($self, $input_place, $value) = @_;
591 0 $self->_add("+f" . $input_place, "$value");
592 }
593
594 0 ▶sub increase_width {
Subroutine increase_width: not called CC=1 SCAR=6.9
Pod undocumented
595 0 my ($self, $input_place, $value) = @_;
596 0 $self->_add("+w" . $input_place, "$value");
597 }
598
599 0 ▶sub increase_height {
Subroutine increase_height: not called CC=1 SCAR=6.9
Pod undocumented
600 0 my ($self, $input_place, $value) = @_;
601 0 $self->_add("+h" . $input_place, "$value");
602 }
603
604 0 ▶sub increase_value {
Subroutine increase_value: not called CC=1 SCAR=6.9
Pod undocumented
605 0 my ($self, $input_place, $value) = @_;
606 0 $self->_add("+v" . $input_place, "$value");
607 }
608
609 # Decrease
610 0 ▶sub decrease_min_length {
Subroutine decrease_min_length: not called CC=1 SCAR=6.9
Pod undocumented
611 0 my ($self, $input_place, $value) = @_;
612 0 $self->_add("-n" . $input_place, "$value");
613 }
614
615 0 ▶sub decrease_max_length {
Subroutine decrease_max_length: not called CC=1 SCAR=6.9
Pod undocumented
616 0 my ($self, $input_place, $value) = @_;
617 0 $self->_add("-x" . $input_place, "$value");
618 }
619
620 0 ▶sub decrease_font_size {
Subroutine decrease_font_size: not called CC=1 SCAR=6.9
Pod undocumented
621 0 my ($self, $input_place, $value) = @_;
622 0 $self->_add("-f" . $input_place, "$value");
623 }
624
625 0 ▶sub decrease_width {
Subroutine decrease_width: not called CC=1 SCAR=6.9
Pod undocumented
626 0 my ($self, $input_place, $value) = @_;
627 0 $self->_add("-w" . $input_place, "$value");
628 }
629
630 0 ▶sub decrease_height {
Subroutine decrease_height: not called CC=1 SCAR=6.9
Pod undocumented
631 0 my ($self, $input_place, $value) = @_;
632 0 $self->_add("-h" . $input_place, "$value");
633 }
634
635 0 ▶sub decrease_value {
Subroutine decrease_value: not called CC=1 SCAR=6.9
Pod undocumented
636 0 my ($self, $input_place, $value) = @_;
637 0 $self->_add("-v" . $input_place, "$value");
638 }
639
640 # Event
641 # ConstructorName: mouseevent, keyboardevent, uievent, focusevent, inputevent, event
642 # All Method in "Event" Section Only Support Dynamic Args Once. To Support Invoking Dynamic Arguments on a Momentary Basis, Use "EventListener" Section Methods.
643 0 ▶sub trigger_event {
Subroutine trigger_event: not called CC=3 SCAR=24.8
Pod undocumented
644 0 my ($self, $input_place, $html_event_listener, $constructor_name) = @_;
645 0 ▶ $constructor_name = "" if !defined $constructor_name;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $constructor_name 0 0 0
646 0 ▶ my $constructor_part = ($constructor_name ne "") ? GS . $constructor_name : "";
Branch: 1 branch
BranchTrueFalseTotal
$constructor_name ne '' ? : 0 0 0
647 0 $self->_add("TE" . $input_place, $html_event_listener . $constructor_part);
648 }
649
650 0 ▶sub set_post_event {
Subroutine set_post_event: not called CC=4 SCAR=30.0
Pod undocumented
651 0 my ($self, $input_place, $html_event, $output_place) = @_;
652 0 ▶ if (@_ == 3) {
Branch: 2 branches
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
elsif (@_ == 4 and $output_place eq '+') { } 0 0 0
653 0 $self->_add("Ep" . $input_place, $html_event);
654 ▶ } elsif (@_ == 4 && $output_place eq "+") {
Condition0%0/3
@_ == 4 and $output_place eq "+"
!ll&&!rl&&r
000
MC/DC0%0/2
@_ == 4 and $output_place eq "+"
@_ == 4 $output_place eq "+"
Truth table0%0/3
A and B
A= @_ == 4B= $output_place eq "+"
ABresult
0X0
100
111
655 0 $self->_add("Ep" . $input_place, $html_event . GS . "+");
656 } else {
657 0 $self->_add("Ep" . $input_place, $html_event . GS . $output_place);
658 }
659 }
660
661 0 ▶sub set_post_event_listener {
Subroutine set_post_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
662 0 my ($self, $input_place, $html_event_listener, $output_place) = @_;
663 0 ▶ if (@_ == 3) {
Branch: 2 branches
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
elsif (@_ == 4 and $output_place eq '+') { } 0 0 0
664 0 $self->_add("EP" . $input_place, $html_event_listener);
665 ▶ } elsif (@_ == 4 && $output_place eq "+") {
Condition0%0/3
@_ == 4 and $output_place eq "+"
!ll&&!rl&&r
000
MC/DC0%0/2
@_ == 4 and $output_place eq "+"
@_ == 4 $output_place eq "+"
Truth table0%0/3
A and B
A= @_ == 4B= $output_place eq "+"
ABresult
0X0
100
111
666 0 $self->_add("EP" . $input_place, $html_event_listener . GS . "+");
667 } else {
668 0 $self->_add("EP" . $input_place, $html_event_listener . GS . $output_place);
669 }
670 }
671
672 0 ▶sub set_get_event {
Subroutine set_get_event: not called CC=4 SCAR=30.0
Pod undocumented
673 0 my ($self, $input_place, $html_event, $path_or_output, $output_place) = @_;
674 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
675 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
676 0 $self->_add("Eg" . $input_place, $html_event . GS . $path);
677 } else {
678 0 $self->_add("Eg" . $input_place, $html_event . GS . $path . GS . $output_place);
679 }
680 }
681
682 0 ▶sub set_get_event_listener {
Subroutine set_get_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
683 0 my ($self, $input_place, $html_event_listener, $path_or_output, $output_place) = @_;
684 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
685 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
686 0 $self->_add("EG" . $input_place, $html_event_listener . GS . $path);
687 } else {
688 0 $self->_add("EG" . $input_place, $html_event_listener . GS . $path . GS . $output_place);
689 }
690 }
691
692 0 ▶sub set_put_event {
Subroutine set_put_event: not called CC=4 SCAR=30.0
Pod undocumented
693 0 my ($self, $input_place, $html_event, $path_or_output, $output_place) = @_;
694 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
695 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
696 0 $self->_add("Et" . $input_place, $html_event . GS . $path);
697 } else {
698 0 $self->_add("Et" . $input_place, $html_event . GS . $path . GS . $output_place);
699 }
700 }
701
702 0 ▶sub set_put_event_listener {
Subroutine set_put_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
703 0 my ($self, $input_place, $html_event_listener, $path_or_output, $output_place) = @_;
704 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
705 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
706 0 $self->_add("ET" . $input_place, $html_event_listener . GS . $path);
707 } else {
708 0 $self->_add("ET" . $input_place, $html_event_listener . GS . $path . GS . $output_place);
709 }
710 }
711
712 0 ▶sub set_patch_event {
Subroutine set_patch_event: not called CC=4 SCAR=30.0
Pod undocumented
713 0 my ($self, $input_place, $html_event, $path_or_output, $output_place) = @_;
714 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
715 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
716 0 $self->_add("Ea" . $input_place, $html_event . GS . $path);
717 } else {
718 0 $self->_add("Ea" . $input_place, $html_event . GS . $path . GS . $output_place);
719 }
720 }
721
722 0 ▶sub set_patch_event_listener {
Subroutine set_patch_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
723 0 my ($self, $input_place, $html_event_listener, $path_or_output, $output_place) = @_;
724 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
725 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
726 0 $self->_add("EA" . $input_place, $html_event_listener . GS . $path);
727 } else {
728 0 $self->_add("EA" . $input_place, $html_event_listener . GS . $path . GS . $output_place);
729 }
730 }
731
732 0 ▶sub set_delete_event {
Subroutine set_delete_event: not called CC=4 SCAR=30.0
Pod undocumented
733 0 my ($self, $input_place, $html_event, $path_or_output, $output_place) = @_;
734 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
735 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
736 0 $self->_add("El" . $input_place, $html_event . GS . $path);
737 } else {
738 0 $self->_add("El" . $input_place, $html_event . GS . $path . GS . $output_place);
739 }
740 }
741
742 0 ▶sub set_delete_event_listener {
Subroutine set_delete_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
743 0 my ($self, $input_place, $html_event_listener, $path_or_output, $output_place) = @_;
744 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
745 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
746 0 $self->_add("EL" . $input_place, $html_event_listener . GS . $path);
747 } else {
748 0 $self->_add("EL" . $input_place, $html_event_listener . GS . $path . GS . $output_place);
749 }
750 }
751
752 0 ▶sub set_options_event {
Subroutine set_options_event: not called CC=4 SCAR=30.0
Pod undocumented
753 0 my ($self, $input_place, $html_event, $path_or_output, $output_place) = @_;
754 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
755 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
756 0 $self->_add("Eo" . $input_place, $html_event . GS . $path);
757 } else {
758 0 $self->_add("Eo" . $input_place, $html_event . GS . $path . GS . $output_place);
759 }
760 }
761
762 0 ▶sub set_options_event_listener {
Subroutine set_options_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
763 0 my ($self, $input_place, $html_event_listener, $path_or_output, $output_place) = @_;
764 0 ▶ my $path = (!defined $path_or_output || $path_or_output eq "") ? "#" : $path_or_output;
Branch: 1 branch
BranchTrueFalseTotal
!defined($path_or_output) || $path_or_output eq '' ? : 0 0 0
Condition0%0/3
not defined $path_or_output or $path_or_output eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path_or_output or $path_or_output eq ""
not defined $path_or_output $path_or_output eq ""
Truth table0%0/3
not(A) or B
A= not defined $path_or_outputB= $path_or_output eq ""
ABresult
1X1
011
000
765 0 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 0 0 0
766 0 $self->_add("EO" . $input_place, $html_event_listener . GS . $path);
767 } else {
768 0 $self->_add("EO" . $input_place, $html_event_listener . GS . $path . GS . $output_place);
769 }
770 }
771
772 0 ▶sub set_head_event {
Subroutine set_head_event: not called CC=3 SCAR=24.8
Pod undocumented
773 0 my ($self, $input_place, $html_event, $path) = @_;
774 0 ▶ $path = "#" if !defined $path || $path eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $path or $path eq "" 0 0 0
Condition0%0/3
not defined $path or $path eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path or $path eq ""
not defined $path $path eq ""
Truth table0%0/3
not(A) or B
A= not defined $pathB= $path eq ""
ABresult
1X1
011
000
775 0 $self->_add("Eh" . $input_place, $html_event . GS . $path);
776 }
777
778 0 ▶sub set_head_event_listener {
Subroutine set_head_event_listener: not called CC=3 SCAR=24.8
Pod undocumented
779 0 my ($self, $input_place, $html_event_listener, $path) = @_;
780 0 ▶ $path = "#" if !defined $path || $path eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $path or $path eq "" 0 0 0
Condition0%0/3
not defined $path or $path eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path or $path eq ""
not defined $path $path eq ""
Truth table0%0/3
not(A) or B
A= not defined $pathB= $path eq ""
ABresult
1X1
011
000
781 0 $self->_add("EH" . $input_place, $html_event_listener . GS . $path);
782 }
783
784 # IsMultiPart: If this value is true, the data will be sent based on the Form and with the "content" key.
785 0 ▶sub set_send_event {
Subroutine set_send_event: not called CC=9 SCAR=45.0
Pod undocumented
786 0 my ($self, $input_place, $html_event, $data, $path, $method, $is_multi_part, $content_type, $output_place) = @_;
787 0 ▶ $path = "#" if !defined $path || $path eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $path or $path eq "" 0 0 0
Condition0%0/3
not defined $path or $path eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path or $path eq ""
not defined $path $path eq ""
Truth table0%0/3
not(A) or B
A= not defined $pathB= $path eq ""
ABresult
1X1
011
000
788 0 ▶ $method = "POST" if !defined $method;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $method 0 0 0
789 0 ▶ $is_multi_part = 0 if !defined $is_multi_part;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $is_multi_part 0 0 0
790 0 ▶ $content_type = "text/plain" if !defined $content_type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $content_type 0 0 0
791 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
792
793 0 my $processed_data = $data;
794 0 $processed_data =~ s/\n/\$[ln];/g;
795 0 $processed_data =~ s/"/\$[dq];/g;
796 0 $processed_data =~ s/'/\$[sq];/g;
797
798 0 ▶ my $output_part = ($output_place ne "") ? $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
799 0 ▶ $self->_add("En" . $input_place, $html_event . GS . $processed_data . GS . $path . GS . $method . GS . ($is_multi_part ? "1" : "0") . GS . $content_type . GS . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$is_multi_part ? : 0 0 0
800 }
801
802 0 ▶sub set_send_event_listener {
Subroutine set_send_event_listener: not called CC=9 SCAR=45.0
Pod undocumented
803 0 my ($self, $input_place, $html_event_listener, $data, $path, $method, $is_multi_part, $content_type, $output_place) = @_;
804 0 ▶ $path = "#" if !defined $path || $path eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $path or $path eq "" 0 0 0
Condition0%0/3
not defined $path or $path eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $path or $path eq ""
not defined $path $path eq ""
Truth table0%0/3
not(A) or B
A= not defined $pathB= $path eq ""
ABresult
1X1
011
000
805 0 ▶ $method = "POST" if !defined $method;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $method 0 0 0
806 0 ▶ $is_multi_part = 0 if !defined $is_multi_part;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $is_multi_part 0 0 0
807 0 ▶ $content_type = "text/plain" if !defined $content_type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $content_type 0 0 0
808 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
809
810 0 my $processed_data = $data;
811 0 $processed_data =~ s/\n/\$[ln];/g;
812
813 0 ▶ my $output_part = ($output_place ne "") ? $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
814 0 ▶ $self->_add("EN" . $input_place, $html_event_listener . GS . $processed_data . GS . $path . GS . $method . GS . ($is_multi_part ? "1" : "0") . GS . $content_type . GS . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$is_multi_part ? : 0 0 0
815 }
816
817 0 ▶sub set_comment_event {
Subroutine set_comment_event: not called CC=3 SCAR=24.8
Pod undocumented
818 0 my ($self, $input_place, $html_event, $index, $output_place) = @_;
819 0 ▶ $index = "" if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
820 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
821 0 $self->_add("Eb" . $input_place, $html_event . GS . $index . GS . $output_place);
822 }
823
824 0 ▶sub set_comment_event_listener {
Subroutine set_comment_event_listener: not called CC=3 SCAR=24.8
Pod undocumented
825 0 my ($self, $input_place, $html_event_listener, $index, $output_place) = @_;
826 0 ▶ $index = "" if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
827 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
828 0 $self->_add("EB" . $input_place, $html_event_listener . GS . $index . GS . $output_place);
829 }
830
831 0 ▶sub set_wasm_event {
Subroutine set_wasm_event: not called CC=5 SCAR=34.0
Pod undocumented
832 0 my ($self, $input_place, $html_event, $wasm_language, $wasm_url, $method_name, $args, $output_place) = @_;
833 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
834 0 my $args_join = "";
835 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
836 0 $args_join = "[" . join(US, @$args);
837 }
838 0 $self->_add("Ey" . $input_place, $html_event . GS . $wasm_language . GS . $wasm_url . GS . $method_name . GS . $args_join . GS . $output_place);
839 }
840
841 0 ▶sub set_wasm_event_listener {
Subroutine set_wasm_event_listener: not called CC=5 SCAR=34.0
Pod undocumented
842 0 my ($self, $input_place, $html_event_listener, $wasm_language, $wasm_url, $method_name, $args, $output_place) = @_;
843 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
844 0 my $args_join = "";
845 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
846 0 $args_join = "[" . join(US, @$args);
847 }
848 0 $self->_add("EY" . $input_place, $html_event_listener . GS . $wasm_language . GS . $wasm_url . GS . $method_name . GS . $args_join . GS . $output_place);
849 }
850
851 0 ▶sub set_web_socket_event {
Subroutine set_web_socket_event: not called CC=1 SCAR=6.9
Pod undocumented
852 0 my ($self, $input_place, $html_event, $path) = @_;
853 0 $self->_add("Ew" . $input_place, $html_event . GS . $path);
854 }
855
856 0 ▶sub set_web_socket_event_listener {
Subroutine set_web_socket_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
857 0 my ($self, $input_place, $html_event_listener, $path) = @_;
858 0 $self->_add("EW" . $input_place, $html_event_listener . GS . $path);
859 }
860
861 0 ▶sub set_sse_event {
Subroutine set_sse_event: not called CC=10 SCAR=47.0
Pod undocumented
862 0 my ($self, $input_place, $html_event, $path, $should_reconnect_or_output, $reconnect_try_timeout_or_nil, $output_place) = @_;
863 0 my $should_reconnect = 1;
864 0 my $reconnect_try_timeout = 3000;
865 0 my $out_place = "";
866
867 0 ▶ if (@_ == 5) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 5) { } 0 0 0
868 0 ▶ $should_reconnect = $should_reconnect_or_output // 1;
Condition0%0/2
$should_reconnect_or_output // 1
l!l
00
MC/DC0%0/1
$should_reconnect_or_output // 1
$should_reconnect_or_output
Truth table0%0/2
A
A= $should_reconnect_or_output
Aresult
11
00
869 0 ▶ $reconnect_try_timeout = $reconnect_try_timeout_or_nil // 3000;
Condition0%0/2
$reconnect_try_timeout_or_nil // 3000
l!l
00
MC/DC0%0/1
$reconnect_try_timeout_or_nil // 3000
$reconnect_try_timeout_or_nil
Truth table0%0/2
A
A= $reconnect_try_timeout_or_nil
Aresult
11
00
870 } else {
871 0 ▶ $should_reconnect = $should_reconnect_or_output // 1;
Condition0%0/2
$should_reconnect_or_output // 1
l!l
00
MC/DC0%0/1
$should_reconnect_or_output // 1
$should_reconnect_or_output
Truth table0%0/2
A
A= $should_reconnect_or_output
Aresult
11
00
872 0 ▶ $reconnect_try_timeout = $reconnect_try_timeout_or_nil // 3000;
Condition0%0/2
$reconnect_try_timeout_or_nil // 3000
l!l
00
MC/DC0%0/1
$reconnect_try_timeout_or_nil // 3000
$reconnect_try_timeout_or_nil
Truth table0%0/2
A
A= $reconnect_try_timeout_or_nil
Aresult
11
00
873 0 ▶ $out_place = $output_place // "";
Condition0%0/2
$output_place // ""
l!l
00
MC/DC0%0/1
$output_place // ""
$output_place
Truth table0%0/2
A
A= $output_place
Aresult
11
00
874 }
875
876 0 ▶ if ($out_place eq "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($out_place eq '') { } 0 0 0
877 0 ▶ $self->_add("Ee" . $input_place, $html_event . GS . $path . GS . ($should_reconnect ? "1" : "0") . GS . $reconnect_try_timeout);
Branch: 1 branch
BranchTrueFalseTotal
$should_reconnect ? : 0 0 0
878 } else {
879 0 ▶ $self->_add("Ee" . $input_place, $html_event . GS . $path . GS . ($should_reconnect ? "1" : "0") . GS . $reconnect_try_timeout . GS . $out_place);
Branch: 1 branch
BranchTrueFalseTotal
$should_reconnect ? : 0 0 0
880 }
881 }
882
883 0 ▶sub set_sse_event_listener {
Subroutine set_sse_event_listener: not called CC=10 SCAR=47.0
Pod undocumented
884 0 my ($self, $input_place, $html_event_listener, $path, $should_reconnect_or_output, $reconnect_try_timeout_or_nil, $output_place) = @_;
885 0 my $should_reconnect = 1;
886 0 my $reconnect_try_timeout = 3000;
887 0 my $out_place = "";
888
889 0 ▶ if (@_ == 5) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 5) { } 0 0 0
890 0 ▶ $should_reconnect = $should_reconnect_or_output // 1;
Condition0%0/2
$should_reconnect_or_output // 1
l!l
00
MC/DC0%0/1
$should_reconnect_or_output // 1
$should_reconnect_or_output
Truth table0%0/2
A
A= $should_reconnect_or_output
Aresult
11
00
891 0 ▶ $reconnect_try_timeout = $reconnect_try_timeout_or_nil // 3000;
Condition0%0/2
$reconnect_try_timeout_or_nil // 3000
l!l
00
MC/DC0%0/1
$reconnect_try_timeout_or_nil // 3000
$reconnect_try_timeout_or_nil
Truth table0%0/2
A
A= $reconnect_try_timeout_or_nil
Aresult
11
00
892 } else {
893 0 ▶ $should_reconnect = $should_reconnect_or_output // 1;
Condition0%0/2
$should_reconnect_or_output // 1
l!l
00
MC/DC0%0/1
$should_reconnect_or_output // 1
$should_reconnect_or_output
Truth table0%0/2
A
A= $should_reconnect_or_output
Aresult
11
00
894 0 ▶ $reconnect_try_timeout = $reconnect_try_timeout_or_nil // 3000;
Condition0%0/2
$reconnect_try_timeout_or_nil // 3000
l!l
00
MC/DC0%0/1
$reconnect_try_timeout_or_nil // 3000
$reconnect_try_timeout_or_nil
Truth table0%0/2
A
A= $reconnect_try_timeout_or_nil
Aresult
11
00
895 0 ▶ $out_place = $output_place // "";
Condition0%0/2
$output_place // ""
l!l
00
MC/DC0%0/1
$output_place // ""
$output_place
Truth table0%0/2
A
A= $output_place
Aresult
11
00
896 }
897
898 0 ▶ if ($out_place eq "") {
Branch: 1 branch
BranchTrueFalseTotal
if ($out_place eq '') { } 0 0 0
899 0 ▶ $self->_add("EE" . $input_place, $html_event_listener . GS . $path . GS . ($should_reconnect ? "1" : "0") . GS . $reconnect_try_timeout);
Branch: 1 branch
BranchTrueFalseTotal
$should_reconnect ? : 0 0 0
900 } else {
901 0 ▶ $self->_add("EE" . $input_place, $html_event_listener . GS . $path . GS . ($should_reconnect ? "1" : "0") . GS . $reconnect_try_timeout . GS . $out_place);
Branch: 1 branch
BranchTrueFalseTotal
$should_reconnect ? : 0 0 0
902 }
903 }
904
905 0 ▶sub set_front_event {
Subroutine set_front_event: not called CC=5 SCAR=34.0
Pod undocumented
906 0 my ($self, $input_place, $html_event, $module_path, $args, $output_place) = @_;
907 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
908 0 my $args_join = "";
909 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
910 0 $args_join = GS . "[" . join(US, @$args);
911 }
912 0 $self->_add("Ej" . $input_place, $html_event . GS . $module_path . GS . $output_place . $args_join);
913 }
914
915 0 ▶sub set_front_event_listener {
Subroutine set_front_event_listener: not called CC=5 SCAR=34.0
Pod undocumented
916 0 my ($self, $input_place, $html_event_listener, $module_path, $args, $output_place) = @_;
917 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
918 0 my $args_join = "";
919 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
920 0 $args_join = GS . "[" . join(US, @$args);
921 }
922 0 $self->_add("EJ" . $input_place, $html_event_listener . GS . $module_path . GS . $output_place . $args_join);
923 }
924
925 0 ▶sub set_master_pages_event {
Subroutine set_master_pages_event: not called CC=2 SCAR=17.9
Pod undocumented
926 0 my ($self, $input_place, $html_event, $output_place) = @_;
927 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
928 0 $self->_add("Eu" . $input_place, $html_event . GS . $output_place);
929 }
930
931 0 ▶sub set_master_pages_event_listener {
Subroutine set_master_pages_event_listener: not called CC=2 SCAR=17.9
Pod undocumented
932 0 my ($self, $input_place, $html_event_listener, $output_place) = @_;
933 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
934 0 $self->_add("EU" . $input_place, $html_event_listener . GS . $output_place);
935 }
936
937 0 ▶sub set_prevent_default_event {
Subroutine set_prevent_default_event: not called CC=1 SCAR=6.9
Pod undocumented
938 0 my ($self, $input_place, $html_event) = @_;
939 0 $self->_add("Ed" . $input_place, $html_event);
940 }
941
942 0 ▶sub set_prevent_default_event_listener {
Subroutine set_prevent_default_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
943 0 my ($self, $input_place, $html_event_listener) = @_;
944 0 $self->_add("ED" . $input_place, $html_event_listener);
945 }
946
947 0 ▶sub set_stop_propagation_event {
Subroutine set_stop_propagation_event: not called CC=1 SCAR=6.9
Pod undocumented
948 0 my ($self, $input_place, $html_event) = @_;
949 0 $self->_add("Es" . $input_place, $html_event);
950 }
951
952 0 ▶sub set_stop_propagation_event_listener {
Subroutine set_stop_propagation_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
953 0 my ($self, $input_place, $html_event_listener) = @_;
954 0 $self->_add("ES" . $input_place, $html_event_listener);
955 }
956
957 0 ▶sub set_method_event {
Subroutine set_method_event: not called CC=4 SCAR=30.0
Pod undocumented
958 0 my ($self, $input_place, $html_event, $method_name, $args) = @_;
959 0 my $args_join = "";
960 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
961 0 $args_join = GS . "[" . join(US, @$args);
962 }
963 0 $self->_add("Em" . $input_place, $html_event . GS . $method_name . $args_join);
964 }
965
966 0 ▶sub set_method_event_listener {
Subroutine set_method_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
967 0 my ($self, $input_place, $html_event_listener, $method_name, $args) = @_;
968 0 my $args_join = "";
969 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
970 0 $args_join = GS . "[" . join(US, @$args);
971 }
972 0 $self->_add("EM" . $input_place, $html_event_listener . GS . $method_name . $args_join);
973 }
974
975 0 ▶sub set_module_method_event {
Subroutine set_module_method_event: not called CC=4 SCAR=30.0
Pod undocumented
976 0 my ($self, $input_place, $html_event, $method_name, $args) = @_;
977 0 my $args_join = "";
978 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
979 0 $args_join = GS . "[" . join(US, @$args);
980 }
981 0 $self->_add("Ex" . $input_place, $html_event . GS . $method_name . $args_join);
982 }
983
984 0 ▶sub set_module_method_event_listener {
Subroutine set_module_method_event_listener: not called CC=4 SCAR=30.0
Pod undocumented
985 0 my ($self, $input_place, $html_event_listener, $method_name, $args) = @_;
986 0 my $args_join = "";
987 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
988 0 $args_join = GS . "[" . join(US, @$args);
989 }
990 0 $self->_add("EX" . $input_place, $html_event_listener . GS . $method_name . $args_join);
991 }
992
993 0 ▶sub assign_confirm_event {
Subroutine assign_confirm_event: not called CC=11 SCAR=48.8
Pod undocumented
994 0 my ($self, $input_place, $html_event, $text, $type, $title, $ok_text, $cancel_text) = @_;
995 0 ▶ $text = "Are you sure you want to proceed?" if !defined $text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $text 0 0 0
996 0 ▶ $type = "none" if !defined $type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type 0 0 0
997 0 ▶ $title = "Confirm" if !defined $title;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $title 0 0 0
998 0 ▶ $ok_text = "OK" if !defined $ok_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $ok_text 0 0 0
999 0 ▶ $cancel_text = "Cancel" if !defined $cancel_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cancel_text 0 0 0
1000
1001 0 ▶ my $text_part = ($text eq "Are you sure you want to proceed?" ? "" : $text);
Branch: 1 branch
BranchTrueFalseTotal
$text eq 'Are you sure you want to proceed?' ? : 0 0 0
1002 0 ▶ my $type_part = ($type eq "none" ? "" : $type);
Branch: 1 branch
BranchTrueFalseTotal
$type eq 'none' ? : 0 0 0
1003 0 ▶ my $title_part = ($title eq "Confirm" ? "" : $title);
Branch: 1 branch
BranchTrueFalseTotal
$title eq 'Confirm' ? : 0 0 0
1004 0 ▶ my $ok_part = ($ok_text eq "OK" ? "" : $ok_text);
Branch: 1 branch
BranchTrueFalseTotal
$ok_text eq 'OK' ? : 0 0 0
1005 0 ▶ my $cancel_part = ($cancel_text eq "Cancel" ? "" : $cancel_text);
Branch: 1 branch
BranchTrueFalseTotal
$cancel_text eq 'Cancel' ? : 0 0 0
1006
1007 0 $self->_add("Ef" . $input_place, $html_event . GS . $text_part . GS . $type_part . GS . $title_part . GS . $ok_part . GS . $cancel_part);
1008 }
1009
1010 0 ▶sub remove_post_event {
Subroutine remove_post_event: not called CC=1 SCAR=6.9
Pod undocumented
1011 0 my ($self, $input_place, $html_event) = @_;
1012 0 $self->_add("Rp" . $input_place, $html_event);
1013 }
1014
1015 0 ▶sub remove_post_event_listener {
Subroutine remove_post_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1016 0 my ($self, $input_place, $html_event_listener) = @_;
1017 0 $self->_add("RP" . $input_place, $html_event_listener);
1018 }
1019
1020 0 ▶sub remove_get_event {
Subroutine remove_get_event: not called CC=1 SCAR=6.9
Pod undocumented
1021 0 my ($self, $input_place, $html_event) = @_;
1022 0 $self->_add("Rg" . $input_place, $html_event);
1023 }
1024
1025 0 ▶sub remove_get_event_listener {
Subroutine remove_get_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1026 0 my ($self, $input_place, $html_event_listener) = @_;
1027 0 $self->_add("RG" . $input_place, $html_event_listener);
1028 }
1029
1030 0 ▶sub remove_put_event {
Subroutine remove_put_event: not called CC=1 SCAR=6.9
Pod undocumented
1031 0 my ($self, $input_place, $html_event) = @_;
1032 0 $self->_add("Rt" . $input_place, $html_event);
1033 }
1034
1035 0 ▶sub remove_put_event_listener {
Subroutine remove_put_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1036 0 my ($self, $input_place, $html_event_listener) = @_;
1037 0 $self->_add("RT" . $input_place, $html_event_listener);
1038 }
1039
1040 0 ▶sub remove_patch_event {
Subroutine remove_patch_event: not called CC=1 SCAR=6.9
Pod undocumented
1041 0 my ($self, $input_place, $html_event) = @_;
1042 0 $self->_add("Ra" . $input_place, $html_event);
1043 }
1044
1045 0 ▶sub remove_patch_event_listener {
Subroutine remove_patch_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1046 0 my ($self, $input_place, $html_event_listener) = @_;
1047 0 $self->_add("RA" . $input_place, $html_event_listener);
1048 }
1049
1050 0 ▶sub remove_delete_event {
Subroutine remove_delete_event: not called CC=1 SCAR=6.9
Pod undocumented
1051 0 my ($self, $input_place, $html_event) = @_;
1052 0 $self->_add("Rl" . $input_place, $html_event);
1053 }
1054
1055 0 ▶sub remove_delete_event_listener {
Subroutine remove_delete_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1056 0 my ($self, $input_place, $html_event_listener) = @_;
1057 0 $self->_add("RL" . $input_place, $html_event_listener);
1058 }
1059
1060 0 ▶sub remove_options_event {
Subroutine remove_options_event: not called CC=1 SCAR=6.9
Pod undocumented
1061 0 my ($self, $input_place, $html_event) = @_;
1062 0 $self->_add("Ro" . $input_place, $html_event);
1063 }
1064
1065 0 ▶sub remove_options_event_listener {
Subroutine remove_options_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1066 0 my ($self, $input_place, $html_event_listener) = @_;
1067 0 $self->_add("RO" . $input_place, $html_event_listener);
1068 }
1069
1070 0 ▶sub remove_head_event {
Subroutine remove_head_event: not called CC=1 SCAR=6.9
Pod undocumented
1071 0 my ($self, $input_place, $html_event) = @_;
1072 0 $self->_add("Rh" . $input_place, $html_event);
1073 }
1074
1075 0 ▶sub remove_head_event_listener {
Subroutine remove_head_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1076 0 my ($self, $input_place, $html_event_listener) = @_;
1077 0 $self->_add("RH" . $input_place, $html_event_listener);
1078 }
1079
1080 0 ▶sub remove_send_event {
Subroutine remove_send_event: not called CC=1 SCAR=6.9
Pod undocumented
1081 0 my ($self, $input_place, $html_event) = @_;
1082 0 $self->_add("Rn" . $input_place, $html_event);
1083 }
1084
1085 0 ▶sub remove_send_event_listener {
Subroutine remove_send_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1086 0 my ($self, $input_place, $html_event_listener) = @_;
1087 0 $self->_add("RN" . $input_place, $html_event_listener);
1088 }
1089
1090 0 ▶sub remove_comment_event {
Subroutine remove_comment_event: not called CC=1 SCAR=6.9
Pod undocumented
1091 0 my ($self, $input_place, $html_event) = @_;
1092 0 $self->_add("Rb" . $input_place, $html_event);
1093 }
1094
1095 0 ▶sub remove_comment_event_listener {
Subroutine remove_comment_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1096 0 my ($self, $input_place, $html_event_listener) = @_;
1097 0 $self->_add("RB" . $input_place, $html_event_listener);
1098 }
1099
1100 0 ▶sub remove_wasm_event {
Subroutine remove_wasm_event: not called CC=1 SCAR=6.9
Pod undocumented
1101 0 my ($self, $input_place, $html_event) = @_;
1102 0 $self->_add("Ry" . $input_place, $html_event);
1103 }
1104
1105 0 ▶sub remove_wasm_event_listener {
Subroutine remove_wasm_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1106 0 my ($self, $input_place, $html_event_listener) = @_;
1107 0 $self->_add("RY" . $input_place, $html_event_listener);
1108 }
1109
1110 0 ▶sub remove_web_socket_event {
Subroutine remove_web_socket_event: not called CC=1 SCAR=6.9
Pod undocumented
1111 0 my ($self, $input_place, $html_event) = @_;
1112 0 $self->_add("Rw" . $input_place, $html_event);
1113 }
1114
1115 0 ▶sub remove_web_socket_event_listener {
Subroutine remove_web_socket_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1116 0 my ($self, $input_place, $html_event_listener) = @_;
1117 0 $self->_add("RW" . $input_place, $html_event_listener);
1118 }
1119
1120 0 ▶sub remove_sse_event {
Subroutine remove_sse_event: not called CC=1 SCAR=6.9
Pod undocumented
1121 0 my ($self, $input_place, $html_event) = @_;
1122 0 $self->_add("Re" . $input_place, $html_event);
1123 }
1124
1125 0 ▶sub remove_sse_event_listener {
Subroutine remove_sse_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1126 0 my ($self, $input_place, $html_event_listener) = @_;
1127 0 $self->_add("RE" . $input_place, $html_event_listener);
1128 }
1129
1130 0 ▶sub remove_front_event {
Subroutine remove_front_event: not called CC=1 SCAR=6.9
Pod undocumented
1131 0 my ($self, $input_place, $html_event) = @_;
1132 0 $self->_add("Rj" . $input_place, $html_event);
1133 }
1134
1135 0 ▶sub remove_front_event_listener {
Subroutine remove_front_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1136 0 my ($self, $input_place, $html_event_listener) = @_;
1137 0 $self->_add("RJ" . $input_place, $html_event_listener);
1138 }
1139
1140 0 ▶sub remove_prevent_default_event {
Subroutine remove_prevent_default_event: not called CC=1 SCAR=6.9
Pod undocumented
1141 0 my ($self, $input_place, $html_event) = @_;
1142 0 $self->_add("Rd" . $input_place, $html_event);
1143 }
1144
1145 0 ▶sub remove_prevent_default_event_listener {
Subroutine remove_prevent_default_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1146 0 my ($self, $input_place, $html_event_listener) = @_;
1147 0 $self->_add("RD" . $input_place, $html_event_listener);
1148 }
1149
1150 0 ▶sub remove_master_pages_event {
Subroutine remove_master_pages_event: not called CC=1 SCAR=6.9
Pod undocumented
1151 0 my ($self, $input_place, $html_event) = @_;
1152 0 $self->_add("Ru" . $input_place, $html_event);
1153 }
1154
1155 0 ▶sub remove_master_pages_event_listener {
Subroutine remove_master_pages_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1156 0 my ($self, $input_place, $html_event_listener) = @_;
1157 0 $self->_add("RU" . $input_place, $html_event_listener);
1158 }
1159
1160 0 ▶sub remove_stop_propagation_event {
Subroutine remove_stop_propagation_event: not called CC=1 SCAR=6.9
Pod undocumented
1161 0 my ($self, $input_place, $html_event) = @_;
1162 0 $self->_add("Rs" . $input_place, $html_event);
1163 }
1164
1165 0 ▶sub remove_stop_propagation_event_listener {
Subroutine remove_stop_propagation_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1166 0 my ($self, $input_place, $html_event_listener) = @_;
1167 0 $self->_add("RS" . $input_place, $html_event_listener);
1168 }
1169
1170 0 ▶sub remove_method_event {
Subroutine remove_method_event: not called CC=1 SCAR=6.9
Pod undocumented
1171 0 my ($self, $input_place, $html_event, $method_name) = @_;
1172 0 $self->_add("Rm" . $input_place, $html_event . GS . $method_name);
1173 }
1174
1175 0 ▶sub remove_method_event_listener {
Subroutine remove_method_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1176 0 my ($self, $input_place, $html_event_listener, $method_name) = @_;
1177 0 $self->_add("RM" . $input_place, $html_event_listener . GS . $method_name);
1178 }
1179
1180 0 ▶sub remove_module_method_event {
Subroutine remove_module_method_event: not called CC=1 SCAR=6.9
Pod undocumented
1181 0 my ($self, $input_place, $html_event, $method_name) = @_;
1182 0 $self->_add("Rx" . $input_place, $html_event . GS . $method_name);
1183 }
1184
1185 0 ▶sub remove_module_method_event_listener {
Subroutine remove_module_method_event_listener: not called CC=1 SCAR=6.9
Pod undocumented
1186 0 my ($self, $input_place, $html_event_listener, $method_name) = @_;
1187 0 $self->_add("RX" . $input_place, $html_event_listener . GS . $method_name);
1188 }
1189
1190 0 ▶sub remove_confirm_event {
Subroutine remove_confirm_event: not called CC=1 SCAR=6.9
Pod undocumented
1191 0 my ($self, $input_place, $html_event) = @_;
1192 0 $self->_add("Rf" . $input_place, $html_event);
1193 }
1194
1195 # Custom Event
1196 # This Method Is Compatible With EventListener And May Not Be Compatible With Events Written As Attributes In Some Browsers.
1197 # Watch: attribute, style, text, children, value
1198 # Compare: greater, less, equal, notequal, includes, startswith, endswith, matches, changed, inrange, lengthgreater, lengthless, lengthequal
1199 # Range: Only Use For Compare With inrange Value. Split By Comma ","
1200 # Key: Only Use For Watch With attribute And style Value
1201 0 ▶sub create_custom_dom_event {
Subroutine create_custom_dom_event: not called CC=4 SCAR=30.0
Pod undocumented
1202 0 my ($self, $input_place, $event_name, $watch, $key, $compare, $value, $range, $immediate, $delay) = @_;
1203 0 ▶ $immediate = 0 if !defined $immediate;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $immediate 0 0 0
1204 0 ▶ $delay = "0" if !defined $delay;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $delay 0 0 0
1205 0 ▶ $self->_add("eC" . $input_place, $event_name . GS . $watch . GS . $key . GS . $compare . GS . $value . GS . $range . GS . ($immediate ? "1" : "0") . GS . $delay);
Branch: 1 branch
BranchTrueFalseTotal
$immediate ? : 0 0 0
1206 }
1207
1208 0 ▶sub enable_scroll_bottom_event {
Subroutine enable_scroll_bottom_event: not called CC=3 SCAR=24.8
Pod undocumented
1209 0 my ($self, $enable) = @_;
1210 0 ▶ $enable = 1 if !defined $enable;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable 0 0 0
1211 0 ▶ $self->_add("eb", $enable ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$enable ? : 0 0 0
1212 }
1213
1214 0 ▶sub enable_reached_element_event {
Subroutine enable_reached_element_event: not called CC=4 SCAR=30.0
Pod undocumented
1215 0 my ($self, $input_place, $once, $enable) = @_;
1216 0 ▶ $enable = 1 if !defined $enable;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable 0 0 0
1217 0 ▶ $self->_add("er" . $input_place, ($once ? "1" : "0") . GS . ($enable ? "1" : "0"));
Branch: 2 branches
BranchTrueFalseTotal
$once ? : 0 0 0
$enable ? : 0 0 0
1218 }
1219
1220 # Module
1221 0 ▶sub load_module {
Subroutine load_module: not called CC=3 SCAR=24.8
Pod undocumented
1222 0 my ($self, $module_path, $methods) = @_;
1223 0 ▶ $methods = [] if !defined $methods;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $methods 0 0 0
1224 0 ▶ my $methods_part = (scalar(@$methods) > 0) ? GS . "[" . join(US, @$methods) : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @$methods > 0 ? : 0 0 0
1225 0 $self->_add("Ml", $module_path . $methods_part);
1226 }
1227
1228 0 ▶sub unload_module {
Subroutine unload_module: not called CC=1 SCAR=6.9
Pod undocumented
1229 0 my ($self, $module_path) = @_;
1230 0 $self->_add("Mu", $module_path);
1231 }
1232
1233 0 ▶sub delete_module_method {
Subroutine delete_module_method: not called CC=1 SCAR=6.9
Pod undocumented
1234 0 my ($self, $method_name) = @_;
1235 0 $self->_add("Md", $method_name);
1236 }
1237
1238 # Unit Testing
1239 # InputPlace Is Actual, Expected Is Tag/OutputPlace
1240 0 ▶sub assert_equal {
Subroutine assert_equal: not called CC=1 SCAR=6.9
Pod undocumented
1241 0 my ($self, $input_place, $tag) = @_;
1242 0 $tag =~ s/\n/\$[ln];/g;
1243 0 $self->_add("At" . $input_place, $tag);
1244 }
1245
1246 0 ▶sub assert_equal_by_output_place {
Subroutine assert_equal_by_output_place: not called CC=1 SCAR=6.9
Pod undocumented
1247 0 my ($self, $input_place, $output_place) = @_;
1248 0 $self->_add("Ao" . $input_place, $output_place);
1249 }
1250
1251 # Debug
1252 0 ▶sub create_debugger {
Subroutine create_debugger: not called CC=3 SCAR=24.8
Pod undocumented
1253 0 my ($self, $pause) = @_;
1254 0 ▶ $pause = 0 if !defined $pause;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $pause 0 0 0
1255 0 ▶ $self->_add("Dc", $pause ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$pause ? : 0 0 0
1256 }
1257
1258 0 ▶sub try {
Subroutine try: not called CC=1 SCAR=6.9
Pod undocumented
1259 0 my ($self) = @_;
1260 0 $self->_add("tr");
1261 }
1262
1263 0 ▶sub catch {
Subroutine catch: not called CC=1 SCAR=6.9
Pod undocumented
1264 0 my ($self) = @_;
1265 0 $self->_add("ca");
1266 }
1267
1268 0 ▶sub comment {
Subroutine comment: not called CC=1 SCAR=6.9
Pod undocumented
1269 0 my ($self, $text) = @_;
1270 0 $self->_add("//", $text);
1271 }
1272
1273 # Service Worker
1274 # To Use Service Worker, You Need To Add The Elanat Dedicated Module (service-worker.js) On The Client Side
1275 0 ▶sub service_worker_register {
Subroutine service_worker_register: not called CC=3 SCAR=24.8
Pod undocumented
1276 0 my ($self, $path, $scope_path) = @_;
1277 0 ▶ $path = "" if !defined $path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $path 0 0 0
1278 0 ▶ $scope_path = "" if !defined $scope_path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $scope_path 0 0 0
1279 0 $self->_add("wR", $path . GS . $scope_path);
1280 }
1281
1282 0 ▶sub service_worker_pre_cache_static {
Subroutine service_worker_pre_cache_static: not called CC=1 SCAR=6.9
Pod undocumented
1283 0 my ($self, $path_list) = @_;
1284 0 $self->_add("wp", join(GS, @$path_list));
1285 }
1286
1287 0 ▶sub service_worker_dynamic_cache {
Subroutine service_worker_dynamic_cache: not called CC=3 SCAR=24.8
Pod undocumented
1288 0 my ($self, $path, $seconds) = @_;
1289 0 ▶ $seconds = "" if !defined $seconds;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $seconds 0 0 0
1290 0 ▶ $self->_add("wc", $path . ($seconds ne "" ? GS . $seconds : ""));
Branch: 1 branch
BranchTrueFalseTotal
$seconds ne '' ? : 0 0 0
1291 }
1292
1293 0 ▶sub service_worker_delete_dynamic_cache {
Subroutine service_worker_delete_dynamic_cache: not called CC=2 SCAR=17.9
Pod undocumented
1294 0 my ($self, $path) = @_;
1295 0 ▶ if (!defined $path) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $path) { } 0 0 0
1296 0 $self->_add("wd");
1297 } else {
1298 0 $self->_add("wd", $path);
1299 }
1300 }
1301
1302 0 ▶sub service_worker_dynamic_cache_ttl_update {
Subroutine service_worker_dynamic_cache_ttl_update: not called CC=3 SCAR=24.8
Pod undocumented
1303 0 my ($self, $path, $seconds) = @_;
1304 0 ▶ $seconds = "" if !defined $seconds;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $seconds 0 0 0
1305 0 ▶ $self->_add("wt", $path . ($seconds ne "" ? GS . $seconds : ""));
Branch: 1 branch
BranchTrueFalseTotal
$seconds ne '' ? : 0 0 0
1306 }
1307
1308 # Path: Support Wildcard Automatically And Also Support Regex If Use "re:" Before Pattern
1309 # Type: Type Is Cache Strategy. cachefirst, networkfirst, cacheonly, networkonly, stalerevalidate (Fast From Cache, Updates Simultaneously From The Network)
1310 # CacheDynamic: If True, Any Successful Network Response For That Route Will Be Stored In The Dynamic Cache
1311 0 ▶sub service_worker_route_set {
Subroutine service_worker_route_set: not called CC=3 SCAR=24.8
Pod undocumented
1312 0 my ($self, $path, $type, $cache_dynamic) = @_;
1313 0 ▶ $cache_dynamic = 0 if !defined $cache_dynamic;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cache_dynamic 0 0 0
1314 0 ▶ $self->_add("wr", $path . GS . $type . ($cache_dynamic ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$cache_dynamic ? : 0 0 0
1315 }
1316
1317 0 ▶sub service_worker_route_alias {
Subroutine service_worker_route_alias: not called CC=1 SCAR=6.9
Pod undocumented
1318 0 my ($self, $path, $to) = @_;
1319 0 $self->_add("wa", $path . GS . $to);
1320 }
1321
1322 0 ▶sub service_worker_delete_route_alias {
Subroutine service_worker_delete_route_alias: not called CC=2 SCAR=17.9
Pod undocumented
1323 0 my ($self, $path) = @_;
1324 0 ▶ $path = "" if !defined $path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $path 0 0 0
1325 0 $self->_add("wC", $path);
1326 }
1327
1328 # Delete All Route And Alias
1329 0 ▶sub service_worker_delete_route {
Subroutine service_worker_delete_route: not called CC=2 SCAR=17.9
Pod undocumented
1330 0 my ($self, $path) = @_;
1331 0 ▶ if (!defined $path) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $path) { } 0 0 0
1332 0 $self->_add("wD");
1333 } else {
1334 0 $self->_add("wD", $path);
1335 }
1336 }
1337
1338 # SSE
1339 0 ▶sub disconnect_sse {
Subroutine disconnect_sse: not called CC=2 SCAR=17.9
Pod undocumented
1340 0 my ($self, $path) = @_;
1341 0 ▶ if (!defined $path) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $path) { } 0 0 0
1342 0 $self->_add("Ds");
1343 } else {
1344 0 $self->_add("Ds", $path);
1345 }
1346 }
1347
1348 0 ▶sub disconnect_all_sse {
Subroutine disconnect_all_sse: not called CC=1 SCAR=6.9
Pod undocumented
1349 0 my ($self) = @_;
1350 0 $self->_add("Ds");
1351 }
1352
1353 # State
1354 0 ▶sub add_state {
Subroutine add_state: not called CC=3 SCAR=24.8
Pod undocumented
1355 0 my ($self, $path, $title) = @_;
1356 0 ▶ $path = "" if !defined $path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $path 0 0 0
1357 0 ▶ $title = "" if !defined $title;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $title 0 0 0
1358 0 $self->_add("AS", $path . GS . $title);
1359 }
1360
1361 0 ▶sub save_state {
Subroutine save_state: not called CC=3 SCAR=24.8
Pod undocumented
1362 0 my ($self, $path, $title) = @_;
1363 0 ▶ $path = "" if !defined $path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $path 0 0 0
1364 0 ▶ $title = "" if !defined $title;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $title 0 0 0
1365 0 $self->_add("As", $path . GS . $title);
1366 }
1367
1368 0 ▶sub load_state {
Subroutine load_state: not called CC=1 SCAR=6.9
Pod undocumented
1369 0 my ($self, $path) = @_;
1370 0 $self->_add("ls", $path);
1371 }
1372
1373 0 ▶sub delete_state {
Subroutine delete_state: not called CC=3 SCAR=24.8
Pod undocumented
1374 0 my ($self, $path) = @_;
1375 0 ▶ if (!defined $path) {
Branch: 2 branches
BranchTrueFalseTotal
if (not defined $path) { } 0 0 0
elsif ($path eq '*') { } 0 0 0
1376 0 $self->_add("DS");
1377 } elsif ($path eq "*") {
1378 0 $self->_add("DS", "*");
1379 } else {
1380 0 $self->_add("DS", $path);
1381 }
1382 }
1383
1384 0 ▶sub delete_all_state {
Subroutine delete_all_state: not called CC=1 SCAR=6.9
Pod undocumented
1385 0 my ($self) = @_;
1386 0 $self->_add("DS", "*");
1387 }
1388
1389 0 ▶sub lock_queue {
Subroutine lock_queue: not called CC=2 SCAR=17.9
Pod undocumented
1390 0 my ($self, $millisecond) = @_;
1391 0 ▶ my $final_millisecond = ($millisecond =~ /^-?\d+$/) ? "${millisecond}" : $millisecond;
Branch: 1 branch
BranchTrueFalseTotal
$millisecond =~ /^-?\d+$/u ? : 0 0 0
1392 0 $self->_add("lq", $final_millisecond);
1393 }
1394
1395 # Cookie
1396 0 ▶sub set_cookie {
Subroutine set_cookie: not called CC=3 SCAR=24.8
Pod undocumented
1397 0 my ($self, $key, $value, $seconds, $path) = @_;
1398 0 ▶ $path = "" if !defined $path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $path 0 0 0
1399 0 ▶ $self->_add("sC", $key . GS . $value . GS . "$seconds" . ($path ne "" ? GS . $path : ""));
Branch: 1 branch
BranchTrueFalseTotal
$path ne '' ? : 0 0 0
1400 }
1401
1402 # Save (Session Cache)
1403 0 ▶sub save_id {
Subroutine save_id: not called CC=2 SCAR=17.9
Pod undocumented
1404 0 my ($self, $input_place, $key) = @_;
1405 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1406 0 $self->_add('@gi' . $input_place, $key);
1407 }
1408
1409 0 ▶sub save_name {
Subroutine save_name: not called CC=2 SCAR=17.9
Pod undocumented
1410 0 my ($self, $input_place, $key) = @_;
1411 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1412 0 $self->_add('@gn' . $input_place, $key);
1413 }
1414
1415 0 ▶sub save_value {
Subroutine save_value: not called CC=2 SCAR=17.9
Pod undocumented
1416 0 my ($self, $input_place, $key) = @_;
1417 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1418 0 $self->_add('@gv' . $input_place, $key);
1419 }
1420
1421 0 ▶sub save_value_length {
Subroutine save_value_length: not called CC=2 SCAR=17.9
Pod undocumented
1422 0 my ($self, $input_place, $key) = @_;
1423 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1424 0 $self->_add('@ge' . $input_place, $key);
1425 }
1426
1427 0 ▶sub save_class {
Subroutine save_class: not called CC=2 SCAR=17.9
Pod undocumented
1428 0 my ($self, $input_place, $key) = @_;
1429 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1430 0 $self->_add('@gc' . $input_place, $key);
1431 }
1432
1433 0 ▶sub save_style {
Subroutine save_style: not called CC=2 SCAR=17.9
Pod undocumented
1434 0 my ($self, $input_place, $key) = @_;
1435 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1436 0 $self->_add('@gs' . $input_place, $key);
1437 }
1438
1439 0 ▶sub save_title {
Subroutine save_title: not called CC=2 SCAR=17.9
Pod undocumented
1440 0 my ($self, $input_place, $key) = @_;
1441 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1442 0 $self->_add('@gl' . $input_place, $key);
1443 }
1444
1445 0 ▶sub save_label {
Subroutine save_label: not called CC=2 SCAR=17.9
Pod undocumented
1446 0 my ($self, $input_place, $key) = @_;
1447 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1448 0 $self->_add('@gA' . $input_place, $key);
1449 }
1450
1451 0 ▶sub save_text {
Subroutine save_text: not called CC=2 SCAR=17.9
Pod undocumented
1452 0 my ($self, $input_place, $key) = @_;
1453 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1454 0 $self->_add('@gt' . $input_place, $key);
1455 }
1456
1457 0 ▶sub save_outer_text {
Subroutine save_outer_text: not called CC=2 SCAR=17.9
Pod undocumented
1458 0 my ($self, $input_place, $key) = @_;
1459 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1460 0 $self->_add('@go' . $input_place, $key);
1461 }
1462
1463 0 ▶sub save_text_length {
Subroutine save_text_length: not called CC=2 SCAR=17.9
Pod undocumented
1464 0 my ($self, $input_place, $key) = @_;
1465 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1466 0 $self->_add('@gg' . $input_place, $key);
1467 }
1468
1469 0 ▶sub save_attribute {
Subroutine save_attribute: not called CC=2 SCAR=17.9
Pod undocumented
1470 0 my ($self, $input_place, $attribute, $key) = @_;
1471 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1472 0 $self->_add('@ga' . $input_place, $key . GS . $attribute);
1473 }
1474
1475 0 ▶sub save_width {
Subroutine save_width: not called CC=2 SCAR=17.9
Pod undocumented
1476 0 my ($self, $input_place, $key) = @_;
1477 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1478 0 $self->_add('@gw' . $input_place, $key);
1479 }
1480
1481 0 ▶sub save_height {
Subroutine save_height: not called CC=2 SCAR=17.9
Pod undocumented
1482 0 my ($self, $input_place, $key) = @_;
1483 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1484 0 $self->_add('@gh' . $input_place, $key);
1485 }
1486
1487 0 ▶sub save_read_only {
Subroutine save_read_only: not called CC=2 SCAR=17.9
Pod undocumented
1488 0 my ($self, $input_place, $key) = @_;
1489 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1490 0 $self->_add('@gr' . $input_place, $key);
1491 }
1492
1493 0 ▶sub save_selected_index {
Subroutine save_selected_index: not called CC=2 SCAR=17.9
Pod undocumented
1494 0 my ($self, $input_place, $key) = @_;
1495 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1496 0 $self->_add('@gx' . $input_place, $key);
1497 }
1498
1499 0 ▶sub save_text_align {
Subroutine save_text_align: not called CC=2 SCAR=17.9
Pod undocumented
1500 0 my ($self, $input_place, $key) = @_;
1501 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1502 0 $self->_add('@gT' . $input_place, $key);
1503 }
1504
1505 0 ▶sub save_node_length {
Subroutine save_node_length: not called CC=2 SCAR=17.9
Pod undocumented
1506 0 my ($self, $input_place, $key) = @_;
1507 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1508 0 $self->_add('@gL' . $input_place, $key);
1509 }
1510
1511 0 ▶sub save_visible {
Subroutine save_visible: not called CC=2 SCAR=17.9
Pod undocumented
1512 0 my ($self, $input_place, $key) = @_;
1513 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1514 0 $self->_add('@gV' . $input_place, $key);
1515 }
1516
1517 0 ▶sub save_url {
Subroutine save_url: not called CC=4 SCAR=30.0
Pod undocumented
1518 0 my ($self, $url, $fetch_script, $key) = @_;
1519 0 ▶ $fetch_script = 0 if !defined $fetch_script;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $fetch_script 0 0 0
1520 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1521 0 ▶ $self->_add('@gu', $key . GS . $url . ($fetch_script ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$fetch_script ? : 0 0 0
1522 }
1523
1524 0 ▶sub save_index {
Subroutine save_index: not called CC=2 SCAR=17.9
Pod undocumented
1525 0 my ($self, $input_place, $key) = @_;
1526 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1527 0 $self->_add('@gI' . $input_place, $key);
1528 }
1529
1530 0 ▶sub remove_save {
Subroutine remove_save: not called CC=1 SCAR=6.9
Pod undocumented
1531 0 my ($self, $cache_key) = @_;
1532 0 $self->_add("rs", $cache_key);
1533 }
1534
1535 0 ▶sub remove_all_save {
Subroutine remove_all_save: not called CC=1 SCAR=6.9
Pod undocumented
1536 0 my ($self) = @_;
1537 0 $self->_add("rs", "*");
1538 }
1539
1540 # Calling the SetSave Method Causes Action Control Requests Triggered by Events Using the GET, POST, PUT, PATCH, DELETE, and OPTIONS Methods, as well as Requests Triggered by the Send Event, to be Temporarily Saved on the Active Page, so the Request will not be Sent to the Server Again.
1541 0 ▶sub set_save {
Subroutine set_save: not called CC=1 SCAR=6.9
Pod undocumented
1542 0 my ($self) = @_;
1543 0 $self->_add("cs", "*");
1544 }
1545
1546 0 ▶sub add_save_value {
Subroutine add_save_value: not called CC=1 SCAR=6.9
Pod undocumented
1547 0 my ($self, $cache_key, $value) = @_;
1548 0 $value =~ s/\n/\$[ln];/g;
1549 0 $self->_add("SA", $cache_key . GS . $value);
1550 }
1551
1552 0 ▶sub insert_save_value {
Subroutine insert_save_value: not called CC=1 SCAR=6.9
Pod undocumented
1553 0 my ($self, $cache_key, $value) = @_;
1554 0 $value =~ s/\n/\$[ln];/g;
1555 0 $self->_add("SI", $cache_key . GS . $value);
1556 }
1557
1558 0 ▶sub append_save_value {
Subroutine append_save_value: not called CC=1 SCAR=6.9
Pod undocumented
1559 0 my ($self, $cache_key, $value) = @_;
1560 0 $value =~ s/\n/\$[ln];/g;
1561 0 $self->_add("SP", $cache_key . GS . $value);
1562 }
1563
1564 0 ▶sub replace_save_value {
Subroutine replace_save_value: not called CC=1 SCAR=6.9
Pod undocumented
1565 0 my ($self, $cache_key, $search_value, $value) = @_;
1566 0 my $val_clean = $value;
1567 0 $val_clean =~ s/\n/\$[ln];/g;
1568 0 my $search_clean = $search_value;
1569 0 $search_clean =~ s/\n/\$[ln];/g;
1570 0 $self->_add("SR", $cache_key . GS . $val_clean . GS . $search_clean);
1571 }
1572
1573 # Is Regex Replace
1574 0 ▶sub set_format_save_value {
Subroutine set_format_save_value: not called CC=1 SCAR=6.9
Pod undocumented
1575 0 my ($self, $cache_key, $regex, $replacement) = @_;
1576 0 my $replacement_clean = $replacement;
1577 0 $replacement_clean =~ s/\n/\$[ln];/g;
1578 0 $self->_add("SF", $cache_key . GS . $regex . GS . $replacement_clean);
1579 }
1580
1581 # Operator: +, -, *, /, %, //, **
1582 0 ▶sub set_arithmetic_save_value {
Subroutine set_arithmetic_save_value: not called CC=2 SCAR=17.9
Pod undocumented
1583 0 my ($self, $cache_key, $operator, $value) = @_;
1584 0 ▶ my $final_value = ($value =~ /^-?\d+$/) ? "${value}" : $value;
Branch: 1 branch
BranchTrueFalseTotal
$value =~ /^-?\d+$/u ? : 0 0 0
1585 0 $self->_add("SM", $cache_key . GS . $operator . GS . $final_value);
1586 }
1587
1588 # Operation: textafter, textafterlast, textbefore, textbeforelast, substring, remove
1589 0 ▶sub set_text_operation_save_value {
Subroutine set_text_operation_save_value: not called CC=3 SCAR=24.8
Pod undocumented
1590 0 my ($self, $cache_key, $operation, $value1, $value2) = @_;
1591 0 ▶ my $final_value1 = ($value1 =~ /^-?\d+$/) ? "${value1}" : $value1;
Branch: 1 branch
BranchTrueFalseTotal
$value1 =~ /^-?\d+$/u ? : 0 0 0
1592 0 ▶ my $final_value2 = ($value2 =~ /^-?\d+$/) ? "${value2}" : $value2;
Branch: 1 branch
BranchTrueFalseTotal
$value2 =~ /^-?\d+$/u ? : 0 0 0
1593 0 $self->_add("ST", $cache_key . GS . $operation . GS . $final_value1 . GS . $final_value2);
1594 }
1595
1596 # Cache
1597 0 ▶sub cache_id {
Subroutine cache_id: not called CC=2 SCAR=17.9
Pod undocumented
1598 0 my ($self, $input_place, $key) = @_;
1599 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1600 0 $self->_add('@ci' . $input_place, $key);
1601 }
1602
1603 0 ▶sub cache_name {
Subroutine cache_name: not called CC=2 SCAR=17.9
Pod undocumented
1604 0 my ($self, $input_place, $key) = @_;
1605 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1606 0 $self->_add('@cn' . $input_place, $key);
1607 }
1608
1609 0 ▶sub cache_value {
Subroutine cache_value: not called CC=2 SCAR=17.9
Pod undocumented
1610 0 my ($self, $input_place, $key) = @_;
1611 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1612 0 $self->_add('@cv' . $input_place, $key);
1613 }
1614
1615 0 ▶sub cache_value_length {
Subroutine cache_value_length: not called CC=2 SCAR=17.9
Pod undocumented
1616 0 my ($self, $input_place, $key) = @_;
1617 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1618 0 $self->_add('@ce' . $input_place, $key);
1619 }
1620
1621 0 ▶sub cache_class {
Subroutine cache_class: not called CC=2 SCAR=17.9
Pod undocumented
1622 0 my ($self, $input_place, $key) = @_;
1623 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1624 0 $self->_add('@cc' . $input_place, $key);
1625 }
1626
1627 0 ▶sub cache_style {
Subroutine cache_style: not called CC=2 SCAR=17.9
Pod undocumented
1628 0 my ($self, $input_place, $key) = @_;
1629 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1630 0 $self->_add('@cs' . $input_place, $key);
1631 }
1632
1633 0 ▶sub cache_title {
Subroutine cache_title: not called CC=2 SCAR=17.9
Pod undocumented
1634 0 my ($self, $input_place, $key) = @_;
1635 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1636 0 $self->_add('@cl' . $input_place, $key);
1637 }
1638
1639 0 ▶sub cache_label {
Subroutine cache_label: not called CC=2 SCAR=17.9
Pod undocumented
1640 0 my ($self, $input_place, $key) = @_;
1641 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1642 0 $self->_add('@cA' . $input_place, $key);
1643 }
1644
1645 0 ▶sub cache_text {
Subroutine cache_text: not called CC=2 SCAR=17.9
Pod undocumented
1646 0 my ($self, $input_place, $key) = @_;
1647 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1648 0 $self->_add('@ct' . $input_place, $key);
1649 }
1650
1651 0 ▶sub cache_outer_text {
Subroutine cache_outer_text: not called CC=2 SCAR=17.9
Pod undocumented
1652 0 my ($self, $input_place, $key) = @_;
1653 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1654 0 $self->_add('@co' . $input_place, $key);
1655 }
1656
1657 0 ▶sub cache_text_length {
Subroutine cache_text_length: not called CC=2 SCAR=17.9
Pod undocumented
1658 0 my ($self, $input_place, $key) = @_;
1659 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1660 0 $self->_add('@cg' . $input_place, $key);
1661 }
1662
1663 0 ▶sub cache_attribute {
Subroutine cache_attribute: not called CC=2 SCAR=17.9
Pod undocumented
1664 0 my ($self, $input_place, $attribute, $key) = @_;
1665 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1666 0 $self->_add('@ca' . $input_place, $key . GS . $attribute);
1667 }
1668
1669 0 ▶sub cache_width {
Subroutine cache_width: not called CC=2 SCAR=17.9
Pod undocumented
1670 0 my ($self, $input_place, $key) = @_;
1671 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1672 0 $self->_add('@cw' . $input_place, $key);
1673 }
1674
1675 0 ▶sub cache_height {
Subroutine cache_height: not called CC=2 SCAR=17.9
Pod undocumented
1676 0 my ($self, $input_place, $key) = @_;
1677 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1678 0 $self->_add('@ch' . $input_place, $key);
1679 }
1680
1681 0 ▶sub cache_read_only {
Subroutine cache_read_only: not called CC=2 SCAR=17.9
Pod undocumented
1682 0 my ($self, $input_place, $key) = @_;
1683 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1684 0 $self->_add('@cr' . $input_place, $key);
1685 }
1686
1687 0 ▶sub cache_selected_index {
Subroutine cache_selected_index: not called CC=2 SCAR=17.9
Pod undocumented
1688 0 my ($self, $input_place, $key) = @_;
1689 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1690 0 $self->_add('@cx' . $input_place, $key);
1691 }
1692
1693 0 ▶sub cache_text_align {
Subroutine cache_text_align: not called CC=2 SCAR=17.9
Pod undocumented
1694 0 my ($self, $input_place, $key) = @_;
1695 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1696 0 $self->_add('@cT' . $input_place, $key);
1697 }
1698
1699 0 ▶sub cache_node_length {
Subroutine cache_node_length: not called CC=2 SCAR=17.9
Pod undocumented
1700 0 my ($self, $input_place, $key) = @_;
1701 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1702 0 $self->_add('@cL' . $input_place, $key);
1703 }
1704
1705 0 ▶sub cache_visible {
Subroutine cache_visible: not called CC=2 SCAR=17.9
Pod undocumented
1706 0 my ($self, $input_place, $key) = @_;
1707 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1708 0 $self->_add('@cV' . $input_place, $key);
1709 }
1710
1711 0 ▶sub cache_url {
Subroutine cache_url: not called CC=4 SCAR=30.0
Pod undocumented
1712 0 my ($self, $url, $fetch_script, $key) = @_;
1713 0 ▶ $fetch_script = 0 if !defined $fetch_script;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $fetch_script 0 0 0
1714 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1715 0 ▶ $self->_add('@cu', $key . GS . $url . ($fetch_script ? GS . "1" : ""));
Branch: 1 branch
BranchTrueFalseTotal
$fetch_script ? : 0 0 0
1716 }
1717
1718 0 ▶sub cache_index {
Subroutine cache_index: not called CC=2 SCAR=17.9
Pod undocumented
1719 0 my ($self, $input_place, $key) = @_;
1720 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
1721 0 $self->_add('@cI' . $input_place, $key);
1722 }
1723
1724 0 ▶sub remove_cache {
Subroutine remove_cache: not called CC=1 SCAR=6.9
Pod undocumented
1725 0 my ($self, $cache_key) = @_;
1726 0 $self->_add("rd", $cache_key);
1727 }
1728
1729 0 ▶sub remove_all_cache {
Subroutine remove_all_cache: not called CC=1 SCAR=6.9
Pod undocumented
1730 0 my ($self) = @_;
1731 0 $self->_add("rd", "*");
1732 }
1733
1734 # Calling the SetCache Method Causes Action Control Requests Triggered by events using the GET, POST, PUT, PATCH, DELETE, and OPTIONS Methods, as well as Requests Triggered by the Send event, to be Cached, so the Request will not be Sent to the Server Again.
1735 0 ▶sub set_cache {
Subroutine set_cache: not called CC=2 SCAR=17.9
Pod undocumented
1736 0 my ($self, $second) = @_;
1737 0 ▶ if (!defined $second) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $second) { } 0 0 0
1738 0 $self->_add("cd", "*");
1739 } else {
1740 0 $self->_add("cd", "$second");
1741 }
1742 }
1743
1744 0 ▶sub add_cache_value {
Subroutine add_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1745 0 my ($self, $cache_key, $value) = @_;
1746 0 $value =~ s/\n/\$[ln];/g;
1747 0 $self->_add("CA", $cache_key . GS . $value);
1748 }
1749
1750 0 ▶sub insert_cache_value {
Subroutine insert_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1751 0 my ($self, $cache_key, $value) = @_;
1752 0 $value =~ s/\n/\$[ln];/g;
1753 0 $self->_add("CI", $cache_key . GS . $value);
1754 }
1755
1756 0 ▶sub append_cache_value {
Subroutine append_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1757 0 my ($self, $cache_key, $value) = @_;
1758 0 $value =~ s/\n/\$[ln];/g;
1759 0 $self->_add("CP", $cache_key . GS . $value);
1760 }
1761
1762 0 ▶sub replace_cache_value {
Subroutine replace_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1763 0 my ($self, $cache_key, $search_value, $value) = @_;
1764 0 my $val_clean = $value;
1765 0 $val_clean =~ s/\n/\$[ln];/g;
1766 0 my $search_clean = $search_value;
1767 0 $search_clean =~ s/\n/\$[ln];/g;
1768 0 $self->_add("CR", $cache_key . GS . $val_clean . GS . $search_clean);
1769 }
1770
1771 # Is Regex Replace
1772 0 ▶sub set_format_cache_value {
Subroutine set_format_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1773 0 my ($self, $cache_key, $regex, $replacement) = @_;
1774 0 my $replacement_clean = $replacement;
1775 0 $replacement_clean =~ s/\n/\$[ln];/g;
1776 0 $self->_add("CF", $cache_key . GS . $regex . GS . $replacement_clean);
1777 }
1778
1779 # Operator: +, -, *, /, %, //, **
1780 0 ▶sub set_arithmetic_cache_value {
Subroutine set_arithmetic_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1781 0 my ($self, $cache_key, $operator, $value) = @_;
1782 0 $self->_add("CM", $cache_key . GS . $operator . GS . $value);
1783 }
1784
1785 # Operation: textafter, textafterlast, textbefore, textbeforelast, substring, remove
1786 0 ▶sub set_text_operation_cache_value {
Subroutine set_text_operation_cache_value: not called CC=1 SCAR=6.9
Pod undocumented
1787 0 my ($self, $cache_key, $operation, $value1, $value2) = @_;
1788 0 $self->_add("CT", $cache_key . GS . $operation . GS . $value1 . GS . $value2);
1789 }
1790
1791 # Call
1792 0 ▶sub load_url {
Subroutine load_url: not called CC=1 SCAR=6.9
Pod undocumented
1793 0 my ($self, $input_place, $url) = @_;
1794 0 $self->_add("lu" . $input_place, $url);
1795 }
1796
1797 0 ▶sub run_action_controls {
Subroutine run_action_controls: not called CC=6 SCAR=37.4
Pod undocumented
1798 0 my ($self, $action_controls, $without_web_forms_section, $index, $use_current_event) = @_;
1799 0 ▶ $without_web_forms_section = 1 if !defined $without_web_forms_section;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $without_web_forms_section 0 0 0
1800 0 ▶ $index = "" if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
1801 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1802 0 ▶ $self->_add("lA", ($use_current_event ? "1" : "0") . GS . ($without_web_forms_section ? "1" : "0") . GS . $index . GS . $action_controls);
Branch: 2 branches
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
$without_web_forms_section ? : 0 0 0
1803 }
1804
1805 0 ▶sub call_script {
Subroutine call_script: not called CC=1 SCAR=6.9
Pod undocumented
1806 0 my ($self, $script_text) = @_;
1807 0 $script_text =~ s/\n/\$[ln];/g;
1808 0 $self->_add("_", $script_text);
1809 }
1810
1811 0 ▶sub call_method {
Subroutine call_method: not called CC=4 SCAR=30.0
Pod undocumented
1812 0 my ($self, $method_name, $args) = @_;
1813 0 my $args_join = "";
1814 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
1815 0 $args_join = GS . "[" . join(US, @$args);
1816 }
1817 0 $self->_add("lm", $method_name . $args_join);
1818 }
1819
1820 0 ▶sub call_module_method {
Subroutine call_module_method: not called CC=4 SCAR=30.0
Pod undocumented
1821 0 my ($self, $method_name, $args) = @_;
1822 0 my $args_join = "";
1823 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
1824 0 $args_join = GS . "[" . join(US, @$args);
1825 }
1826 0 $self->_add("lM", $method_name . $args_join);
1827 }
1828
1829 0 ▶sub call_post_back {
Subroutine call_post_back: not called CC=3 SCAR=24.8
Pod undocumented
1830 0 my ($self, $form_input_place, $output_place) = @_;
1831 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1832 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1833 0 $self->_add("Lp", "1" . GS . $form_input_place . $output_part);
1834 }
1835
1836 0 ▶sub call_comment_back {
Subroutine call_comment_back: not called CC=5 SCAR=34.0
Pod undocumented
1837 0 my ($self, $index, $input_place, $use_current_event) = @_;
1838 0 ▶ $index = "" if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
1839 0 ▶ $input_place = "" if !defined $input_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $input_place 0 0 0
1840 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1841 0 ▶ $self->_add("LC", ($use_current_event ? "1" : "0") . GS . "$index" . GS . $input_place);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1842 }
1843
1844 0 ▶sub call_wasm_back {
Subroutine call_wasm_back: not called CC=7 SCAR=40.3
Pod undocumented
1845 0 my ($self, $wasm_language, $wasm_url, $method_name, $args, $output_place, $use_current_event) = @_;
1846 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1847 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1848 0 my $args_join = "";
1849 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
1850 0 $args_join = "[" . join(US, @$args);
1851 }
1852 0 ▶ $self->_add("Ly", ($use_current_event ? "1" : "0") . GS . $wasm_language . GS . $wasm_url . GS . $method_name . GS . $args_join . GS . $output_place);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1853 }
1854
1855 0 ▶sub call_web_socket_back {
Subroutine call_web_socket_back: not called CC=3 SCAR=24.8
Pod undocumented
1856 0 my ($self, $path, $use_current_event) = @_;
1857 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1858 0 ▶ $self->_add("Lw", ($use_current_event ? "1" : "0") . GS . $path);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1859 }
1860
1861 0 ▶sub call_sse_back {
Subroutine call_sse_back: not called CC=8 SCAR=42.8
Pod undocumented
1862 0 my ($self, $path, $output_place, $use_current_event, $should_reconnect, $reconnect_try_timeout) = @_;
1863 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1864 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1865 0 ▶ $should_reconnect = 1 if !defined $should_reconnect;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $should_reconnect 0 0 0
1866 0 ▶ $reconnect_try_timeout = "3000" if !defined $reconnect_try_timeout;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $reconnect_try_timeout 0 0 0
1867 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1868 0 ▶ $self->_add("Ls", ($use_current_event ? "1" : "0") . GS . $path . GS . ($should_reconnect ? "1" : "0") . GS . "$reconnect_try_timeout" . $output_part);
Branch: 2 branches
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
$should_reconnect ? : 0 0 0
1869 }
1870
1871 0 ▶sub call_front {
Subroutine call_front: not called CC=7 SCAR=40.3
Pod undocumented
1872 0 my ($self, $module_path, $args, $output_place, $use_current_event) = @_;
1873 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1874 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1875 0 my $args_join = "";
1876 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
1877 0 $args_join = GS . "[" . join(US, @$args);
1878 }
1879 0 ▶ $self->_add("Lj", ($use_current_event ? "1" : "0") . GS . $module_path . GS . $output_place . $args_join);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1880 }
1881
1882 0 ▶sub call_get_back {
Subroutine call_get_back: not called CC=5 SCAR=34.0
Pod undocumented
1883 0 my ($self, $path, $output_place, $use_current_event) = @_;
1884 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1885 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1886 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1887 0 ▶ $self->_add("Lg", ($use_current_event ? "1" : "0") . GS . $path . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1888 }
1889
1890 0 ▶sub call_put_back {
Subroutine call_put_back: not called CC=5 SCAR=34.0
Pod undocumented
1891 0 my ($self, $path, $output_place, $use_current_event) = @_;
1892 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1893 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1894 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1895 0 ▶ $self->_add("Lt", ($use_current_event ? "1" : "0") . GS . $path . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1896 }
1897
1898 0 ▶sub call_patch_back {
Subroutine call_patch_back: not called CC=5 SCAR=34.0
Pod undocumented
1899 0 my ($self, $path, $output_place, $use_current_event) = @_;
1900 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1901 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1902 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1903 0 ▶ $self->_add("LP", ($use_current_event ? "1" : "0") . GS . $path . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1904 }
1905
1906 0 ▶sub call_delete_back {
Subroutine call_delete_back: not called CC=5 SCAR=34.0
Pod undocumented
1907 0 my ($self, $path, $output_place, $use_current_event) = @_;
1908 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1909 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1910 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1911 0 ▶ $self->_add("Ld", ($use_current_event ? "1" : "0") . GS . $path . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1912 }
1913
1914 0 ▶sub call_head_back {
Subroutine call_head_back: not called CC=3 SCAR=24.8
Pod undocumented
1915 0 my ($self, $path, $use_current_event) = @_;
1916 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1917 0 ▶ $self->_add("Lh", ($use_current_event ? "1" : "0") . GS . $path);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1918 }
1919
1920 0 ▶sub call_options_back {
Subroutine call_options_back: not called CC=5 SCAR=34.0
Pod undocumented
1921 0 my ($self, $path, $output_place, $use_current_event) = @_;
1922 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1923 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1924 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1925 0 ▶ $self->_add("Lo", ($use_current_event ? "1" : "0") . GS . $path . $output_part);
Branch: 1 branch
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
1926 }
1927
1928 0 ▶sub call_send_back {
Subroutine call_send_back: not called CC=6 SCAR=37.4
Pod undocumented
1929 0 my ($self, $path, $method, $is_multi_part, $content_type, $data, $output_place, $use_current_event) = @_;
1930 0 ▶ $output_place = "" if !defined $output_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $output_place 0 0 0
1931 0 ▶ $use_current_event = 1 if !defined $use_current_event;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $use_current_event 0 0 0
1932 0 $data =~ s/\n/\$[ln];/g;
1933 0 ▶ my $output_part = ($output_place ne "") ? GS . $output_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$output_place ne '' ? : 0 0 0
1934 0 ▶ $self->_add("LS", ($use_current_event ? "1" : "0") . GS . $path . GS . $method . GS . ($is_multi_part ? "1" : "0") . GS . $content_type . GS . $data . $output_part);
Branch: 2 branches
BranchTrueFalseTotal
$use_current_event ? : 0 0 0
$is_multi_part ? : 0 0 0
1935 }
1936
1937 # Update
1938 0 ▶sub increase {
Subroutine increase: not called CC=1 SCAR=6.9
Pod undocumented
1939 0 my ($self, $input_place, $value) = @_;
1940 0 $self->_add("gt" . $input_place, "i" . GS . "$value");
1941 }
1942
1943 0 ▶sub decrease {
Subroutine decrease: not called CC=1 SCAR=6.9
Pod undocumented
1944 0 my ($self, $input_place, $value) = @_;
1945 0 $self->_add("gt" . $input_place, "i" . GS . ($value * -1));
1946 }
1947
1948 # If You Don't Use Deep Mode, any Tags Inside the Current Tag Will Simply Be Treated as Strings. Deep Mode Does not Remove Inner Elements.
1949 0 ▶sub replace {
Subroutine replace: not called CC=5 SCAR=34.0
Pod undocumented
1950 0 my ($self, $input_place, $value, $new_value, $also_start_tag, $deep) = @_;
1951 0 ▶ $also_start_tag = 0 if !defined $also_start_tag;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $also_start_tag 0 0 0
1952 0 ▶ $deep = 1 if !defined $deep;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $deep 0 0 0
1953 0 ▶ $self->_add("gt" . $input_place, "r" . GS . $value . GS . $new_value . GS . ($also_start_tag ? "1" : "0") . GS . ($deep ? "1" : "0"));
Branch: 2 branches
BranchTrueFalseTotal
$also_start_tag ? : 0 0 0
$deep ? : 0 0 0
1954 }
1955
1956 # HTML Converts Attribute Names to Lowercase, so they Need to Be Written in Lowercase.
1957 0 ▶sub replace_start_tag {
Subroutine replace_start_tag: not called CC=1 SCAR=6.9
Pod undocumented
1958 0 my ($self, $input_place, $value, $new_value) = @_;
1959 0 $self->_add("gt" . $input_place, "s" . GS . $value . GS . $new_value);
1960 }
1961
1962 # Pre Runner
1963 0 ▶sub assign_delay {
Subroutine assign_delay: not called CC=5 SCAR=34.0
Pod undocumented
1964 0 my ($self, $milli_second, $index) = @_;
1965 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
1966 0 my $current_line = $self->_get_line_by_index($index);
1967 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
1968
1969 0 my @parts = split(/=/, $current_line, 2);
1970 0 my $new_name = ":" . $milli_second . ")" . $parts[0];
1971 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
1972
1973 0 $self->_update_line_by_index($index, $new_name, $new_value);
1974 }
1975
1976 0 ▶sub assign_delay_change {
Subroutine assign_delay_change: not called CC=7 SCAR=40.3
Pod undocumented
1977 0 my ($self, $milli_second, $index) = @_;
1978 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
1979 0 my $current_line = $self->_get_line_by_index($index);
1980 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
1981
1982 0 my @parts = split(/=/, $current_line, 2);
1983 0 my $current_name = $parts[0];
1984
1985 0 ▶ if ($current_name =~ /^:/ && $current_name =~ /\)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($current_name =~ /^:/u and $current_name =~ /\)/u) 0 0 0
Condition0%0/3
$current_name =~ /^:/u and $current_name =~ /\)/u
!ll&&!rl&&r
000
MC/DC0%0/2
$current_name =~ /^:/u and $current_name =~ /\)/u
$current_name =~ /^:/u $current_name =~ /\)/u
Truth table0%0/3
A and B
A= $current_name =~ /^:/uB= $current_name =~ /\)/u
ABresult
0X0
100
111
1986 0 my $closing_bracket = index($current_name, ')');
1987 0 $current_name = substr($current_name, $closing_bracket + 1);
1988 }
1989
1990 0 my $new_name = ":" . $milli_second . ")" . $current_name;
1991 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
1992
1993 0 $self->_update_line_by_index($index, $new_name, $new_value);
1994 }
1995
1996 0 ▶sub assign_interval {
Subroutine assign_interval: not called CC=7 SCAR=40.3
Pod undocumented
1997 0 my ($self, $milli_second, $id, $index) = @_;
1998 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
1999 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
2000 0 my $current_line = $self->_get_line_by_index($index);
2001 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
2002
2003 0 my @parts = split(/=/, $current_line, 2);
2004 0 ▶ my $id_part = ($id ne "") ? "|" . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
2005 0 my $new_name = "(" . $milli_second . $id_part . ")" . $parts[0];
2006 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
2007
2008 0 $self->_update_line_by_index($index, $new_name, $new_value);
2009 }
2010
2011 0 ▶sub assign_interval_change {
Subroutine assign_interval_change: not called CC=9 SCAR=45.0
Pod undocumented
2012 0 my ($self, $milli_second, $id, $index) = @_;
2013 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
2014 0 ▶ $id = "" if !defined $id;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id 0 0 0
2015 0 my $current_line = $self->_get_line_by_index($index);
2016 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
2017
2018 0 my @parts = split(/=/, $current_line, 2);
2019 0 my $current_name = $parts[0];
2020
2021 0 ▶ if ($current_name =~ /^\(/ && $current_name =~ /\)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($current_name =~ /^\(/u and $current_name =~ /\)/u) 0 0 0
Condition0%0/3
$current_name =~ /^\(/u and $current_name =~ /\)/u
!ll&&!rl&&r
000
MC/DC0%0/2
$current_name =~ /^\(/u and $current_name =~ /\)/u
$current_name =~ /^\(/u $current_name =~ /\)/u
Truth table0%0/3
A and B
A= $current_name =~ /^\(/uB= $current_name =~ /\)/u
ABresult
0X0
100
111
2022 0 my $closing_bracket = index($current_name, ')');
2023 0 $current_name = substr($current_name, $closing_bracket + 1);
2024 }
2025
2026 0 ▶ my $id_part = ($id ne "") ? "|" . $id : "";
Branch: 1 branch
BranchTrueFalseTotal
$id ne '' ? : 0 0 0
2027 0 my $new_name = "(" . $milli_second . $id_part . ")" . $current_name;
2028 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
2029
2030 0 $self->_update_line_by_index($index, $new_name, $new_value);
2031 }
2032
2033 0 ▶sub delete_interval {
Subroutine delete_interval: not called CC=1 SCAR=6.9
Pod undocumented
2034 0 my ($self, $id) = @_;
2035 0 $self->_add("Di", $id);
2036 }
2037
2038 0 ▶sub assign_repeat {
Subroutine assign_repeat: not called CC=5 SCAR=34.0
Pod undocumented
2039 0 my ($self, $count, $index) = @_;
2040 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
2041 0 my $current_line = $self->_get_line_by_index($index);
2042 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
2043
2044 0 my @parts = split(/=/, $current_line, 2);
2045 0 my $new_name = "," . $count . ")" . $parts[0];
2046 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
2047
2048 0 $self->_update_line_by_index($index, $new_name, $new_value);
2049 }
2050
2051 0 ▶sub assign_repeat_change {
Subroutine assign_repeat_change: not called CC=7 SCAR=40.3
Pod undocumented
2052 0 my ($self, $count, $index) = @_;
2053 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
2054 0 my $current_line = $self->_get_line_by_index($index);
2055 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
2056
2057 0 my @parts = split(/=/, $current_line, 2);
2058 0 my $current_name = $parts[0];
2059
2060 0 ▶ if ($current_name =~ /^,/ && $current_name =~ /\)/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($current_name =~ /^,/u and $current_name =~ /\)/u) 0 0 0
Condition0%0/3
$current_name =~ /^,/u and $current_name =~ /\)/u
!ll&&!rl&&r
000
MC/DC0%0/2
$current_name =~ /^,/u and $current_name =~ /\)/u
$current_name =~ /^,/u $current_name =~ /\)/u
Truth table0%0/3
A and B
A= $current_name =~ /^,/uB= $current_name =~ /\)/u
ABresult
0X0
100
111
2061 0 my $closing_bracket = index($current_name, ')');
2062 0 $current_name = substr($current_name, $closing_bracket + 1);
2063 }
2064
2065 0 my $new_name = "," . $count . ")" . $current_name;
2066 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
2067
2068 0 $self->_update_line_by_index($index, $new_name, $new_value);
2069 }
2070
2071 # Index
2072 0 ▶sub start_index {
Subroutine start_index: not called CC=2 SCAR=17.9
Pod undocumented
2073 0 my ($self, $name) = @_;
2074 0 ▶ $name = "" if !defined $name;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $name 0 0 0
2075 0 $self->_add("#", $name);
2076 }
2077
2078 # This Index Is Automatically Run After Changing The Browser History (Back And Forward Buttons)
2079 0 ▶sub start_state {
Subroutine start_state: not called CC=1 SCAR=6.9
Pod undocumented
2080 0 my ($self) = @_;
2081 0 $self->start_index('$');
2082 }
2083
2084 0 ▶sub go_to {
Subroutine go_to: not called CC=8 SCAR=42.8
Pod undocumented
2085 0 my ($self, $line, $repeat) = @_;
2086 0 ▶ if (ref($line) eq '' && $line =~ /^-?\d+$/ && ref($repeat) eq '' && $repeat =~ /^-?\d+$/) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $line eq '' and $line =~ /^-?\d+$/u and ref $repeat eq '' and $repeat =~ /^-?\d+$/u) { } 0 0 0
elsif (ref $repeat eq '' and $repeat =~ /^-?\d+$/u) { } 0 0 0
Condition0%0/9
ref $line eq "" and $line =~ /^-?\d+$/u and ref $repeat eq "" and $repeat =~ /^-?\d+$/u
!ll&&!rl&&r
000
ref $line eq "" and $line =~ /^-?\d+$/u and ref $repeat eq ""
!ll&&!rl&&r
000
ref $line eq "" and $line =~ /^-?\d+$/u
!ll&&!rl&&r
000
MC/DC0%0/4
ref $line eq "" and $line =~ /^-?\d+$/u and ref $repeat eq "" and $repeat =~ /^-?\d+$/u
ref $line eq "" $line =~ /^-?\d+$/u ref $repeat eq "" $repeat =~ /^-?\d+$/u
Truth table0%0/5
A and B and C and D
A= ref $line eq ""B= $line =~ /^-?\d+$/uC= ref $repeat eq ""D= $repeat =~ /^-?\d+$/u
ABCDresult
0XXX0
10XX0
110X0
11100
11111
2087 0 $self->_add("&", "$line" . GS . "$repeat");
2088 ▶ } elsif (ref($repeat) eq '' && $repeat =~ /^-?\d+$/) {
Condition0%0/3
ref $repeat eq "" and $repeat =~ /^-?\d+$/u
!ll&&!rl&&r
000
MC/DC0%0/2
ref $repeat eq "" and $repeat =~ /^-?\d+$/u
ref $repeat eq "" $repeat =~ /^-?\d+$/u
Truth table0%0/3
A and B
A= ref $repeat eq ""B= $repeat =~ /^-?\d+$/u
ABresult
0X0
100
111
2089 0 $self->_add("&", "#" . $line . GS . "$repeat");
2090 } else {
2091 0 ▶ $repeat = 1 if !defined $repeat;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $repeat 0 0 0
2092 0 $self->_add("&", "$line" . GS . "$repeat");
2093 }
2094 }
2095
2096 # Start
2097 0 ▶sub start_transient_dom {
Subroutine start_transient_dom: not called CC=1 SCAR=6.9
Pod undocumented
2098 0 my ($self, $input_place) = @_;
2099 0 $self->_add("td", $input_place);
2100 }
2101
2102 0 ▶sub end_transient_dom {
Subroutine end_transient_dom: not called CC=1 SCAR=6.9
Pod undocumented
2103 0 my ($self) = @_;
2104 0 $self->_add("td", ";");
2105 }
2106
2107 # Message
2108 # Type: warning, problem, help, success, none
2109 0 ▶sub alert {
Subroutine alert: not called CC=7 SCAR=40.3
Pod undocumented
2110 0 my ($self, $text, $type, $title, $ok_text) = @_;
2111 0 ▶ $type = "none" if !defined $type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type 0 0 0
2112 0 ▶ $title = "Alert" if !defined $title;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $title 0 0 0
2113 0 ▶ $ok_text = "OK" if !defined $ok_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $ok_text 0 0 0
2114 0 ▶ $self->_add("Al", $text . GS . ($type eq "none" ? "" : $type) . GS . ($title eq "Alert" ? "" : $title) . GS . ($ok_text eq "OK" ? "" : $ok_text));
Branch: 3 branches
BranchTrueFalseTotal
$type eq 'none' ? : 0 0 0
$title eq 'Alert' ? : 0 0 0
$ok_text eq 'OK' ? : 0 0 0
2115 }
2116
2117 0 ▶sub message {
Subroutine message: not called CC=11 SCAR=48.8
Pod undocumented
2118 0 my ($self, $text, $type_or_duration, $duration) = @_;
2119 0 ▶ if (ref($type_or_duration) eq '' && $type_or_duration =~ /^-?\d+$/) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $type_or_duration eq '' and $type_or_duration =~ /^-?\d+$/u) { } 0 0 0
elsif (defined $duration and ref $duration eq '' and $duration =~ /^-?\d+$/u) { } 0 0 0
Condition0%0/3
ref $type_or_duration eq "" and $type_or_duration =~ /^-?\d+$/u
!ll&&!rl&&r
000
MC/DC0%0/2
ref $type_or_duration eq "" and $type_or_duration =~ /^-?\d+$/u
ref $type_or_duration eq "" $type_or_duration =~ /^-?\d+$/u
Truth table0%0/3
A and B
A= ref $type_or_duration eq ""B= $type_or_duration =~ /^-?\d+$/u
ABresult
0X0
100
111
2120 0 $self->_add("me", $text . GS . "" . GS . "$type_or_duration");
2121 ▶ } elsif (defined $duration && ref($duration) eq '' && $duration =~ /^-?\d+$/) {
Condition0%0/6
defined $duration and ref $duration eq "" and $duration =~ /^-?\d+$/u
!ll&&!rl&&r
000
defined $duration and ref $duration eq ""
!ll&&!rl&&r
000
MC/DC0%0/3
defined $duration and ref $duration eq "" and $duration =~ /^-?\d+$/u
defined $duration ref $duration eq "" $duration =~ /^-?\d+$/u
Truth table0%0/4
A and B and C
A= defined $durationB= ref $duration eq ""C= $duration =~ /^-?\d+$/u
ABCresult
0XX0
10X0
1100
1111
2122 0 ▶ $self->_add("me", $text . GS . ($type_or_duration eq "none" ? "" : $type_or_duration) . GS . "$duration");
Branch: 1 branch
BranchTrueFalseTotal
$type_or_duration eq 'none' ? : 0 0 0
2123 } else {
2124 0 ▶ $type_or_duration = "none" if !defined $type_or_duration;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type_or_duration 0 0 0
2125 0 ▶ $duration = "0" if !defined $duration;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $duration 0 0 0
2126 0 ▶ $self->_add("me", $text . GS . ($type_or_duration eq "none" ? "" : $type_or_duration) . GS . ($duration eq "0" ? "" : $duration));
Branch: 2 branches
BranchTrueFalseTotal
$type_or_duration eq 'none' ? : 0 0 0
$duration eq '0' ? : 0 0 0
2127 }
2128 }
2129
2130 # Type: log, info, warn, error, debug, trace, group, groupend, table
2131 0 ▶sub console_message {
Subroutine console_message: not called CC=3 SCAR=24.8
Pod undocumented
2132 0 my ($self, $text, $type) = @_;
2133 0 ▶ $type = "log" if !defined $type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type 0 0 0
2134 0 $text =~ s/\n/\$[ln];/g;
2135 0 ▶ $self->_add("mc", $text . ($type eq "log" ? "" : GS . $type));
Branch: 1 branch
BranchTrueFalseTotal
$type eq 'log' ? : 0 0 0
2136 }
2137
2138 0 ▶sub console_message_assert {
Subroutine console_message_assert: not called CC=1 SCAR=6.9
Pod undocumented
2139 0 my ($self, $text, $condition) = @_;
2140 0 $text =~ s/\n/\$[ln];/g;
2141 0 $self->_add("ma", $text . GS . $condition);
2142 }
2143
2144 # Enable
2145 # Calling The EnableWebSocket Or EnableWebSocketOnce Or AddWebSocket Methods Will Cause Any Subsequent Requests (Under WebForms Core Technology) To Operate Under The WebSocket Protocol.
2146 0 ▶sub enable_web_socket {
Subroutine enable_web_socket: not called CC=3 SCAR=24.8
Pod undocumented
2147 0 my ($self, $enable) = @_;
2148 0 ▶ $enable = 1 if !defined $enable;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $enable 0 0 0
2149 0 ▶ $self->_add("ew", $enable ? "1" : "0");
Branch: 1 branch
BranchTrueFalseTotal
$enable ? : 0 0 0
2150 }
2151
2152 0 ▶sub enable_web_socket_once {
Subroutine enable_web_socket_once: not called CC=1 SCAR=6.9
Pod undocumented
2153 0 my ($self) = @_;
2154 0 $self->_add("ew", '$');
2155 }
2156
2157 0 ▶sub add_web_socket {
Subroutine add_web_socket: not called CC=1 SCAR=6.9
Pod undocumented
2158 0 my ($self, $path) = @_;
2159 0 $self->_add("aw" . $path);
2160 }
2161
2162 # Disconnected WebSocket
2163 0 ▶sub delete_web_socket {
Subroutine delete_web_socket: not called CC=1 SCAR=6.9
Pod undocumented
2164 0 my ($self, $path) = @_;
2165 0 $self->_add("dw" . $path);
2166 }
2167
2168 # Use
2169 # InputPlace Using Only For form Element
2170 0 ▶sub use_web_socket {
Subroutine use_web_socket: not called CC=1 SCAR=6.9
Pod undocumented
2171 0 my ($self, $input_place) = @_;
2172 0 $self->_add("uw" . $input_place);
2173 }
2174
2175 0 ▶sub use_only_change_update {
Subroutine use_only_change_update: not called CC=1 SCAR=6.9
Pod undocumented
2176 0 my ($self, $input_place) = @_;
2177 0 $self->_add("uo" . $input_place);
2178 }
2179
2180 # Condition And Loop
2181 # Condition And Loop Supports Brackets and Then
2182 # Type: warning, problem, help, success, none
2183 # Interval: Value 0 is Await (if is not True, all Next Action Controls Waiting for it), Value -1 is Sync Check Once (is Support Bracket or Next Action Control), Value > 0 is Async and is Wait Based on Time Repetition Until it Becomes True (Is Support Bracket or Next Action Control, but is not Support Else).
2184 # Nested Conditions and Nested Loops are Possible.
2185 0 ▶sub confirm_is_true_accept {
Subroutine confirm_is_true_accept: not called CC=13 SCAR=52.0
Pod undocumented
2186 0 my ($self, $text, $type, $title, $ok_text, $cancel_text, $interval) = @_;
2187 0 ▶ $text = "Are you sure you want to proceed?" if !defined $text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $text 0 0 0
2188 0 ▶ $type = "none" if !defined $type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type 0 0 0
2189 0 ▶ $title = "Confirm" if !defined $title;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $title 0 0 0
2190 0 ▶ $ok_text = "OK" if !defined $ok_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $ok_text 0 0 0
2191 0 ▶ $cancel_text = "Cancel" if !defined $cancel_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cancel_text 0 0 0
2192 0 ▶ $interval = 100 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2193
2194 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2195 0 ▶ my $text_part = ($text eq "Are you sure you want to proceed?" ? "" : $text);
Branch: 1 branch
BranchTrueFalseTotal
$text eq 'Are you sure you want to proceed?' ? : 0 0 0
2196 0 ▶ my $type_part = ($type eq "none" ? "" : $type);
Branch: 1 branch
BranchTrueFalseTotal
$type eq 'none' ? : 0 0 0
2197 0 ▶ my $title_part = ($title eq "Confirm" ? "" : $title);
Branch: 1 branch
BranchTrueFalseTotal
$title eq 'Confirm' ? : 0 0 0
2198 0 ▶ my $ok_part = ($ok_text eq "OK" ? "" : $ok_text);
Branch: 1 branch
BranchTrueFalseTotal
$ok_text eq 'OK' ? : 0 0 0
2199 0 ▶ my $cancel_part = ($cancel_text eq "Cancel" ? "" : $cancel_text);
Branch: 1 branch
BranchTrueFalseTotal
$cancel_text eq 'Cancel' ? : 0 0 0
2200
2201 0 $self->_add($prefix . "ct", $text_part . GS . $type_part . GS . $title_part . GS . $ok_part . GS . $cancel_part);
2202 0 return $self;
2203 }
2204
2205 0 ▶sub confirm_is_false_accept {
Subroutine confirm_is_false_accept: not called CC=13 SCAR=52.0
Pod undocumented
2206 0 my ($self, $text, $type, $title, $ok_text, $cancel_text, $interval) = @_;
2207 0 ▶ $text = "Are you sure you want to proceed?" if !defined $text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $text 0 0 0
2208 0 ▶ $type = "none" if !defined $type;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $type 0 0 0
2209 0 ▶ $title = "Confirm" if !defined $title;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $title 0 0 0
2210 0 ▶ $ok_text = "OK" if !defined $ok_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $ok_text 0 0 0
2211 0 ▶ $cancel_text = "Cancel" if !defined $cancel_text;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cancel_text 0 0 0
2212 0 ▶ $interval = 100 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2213
2214 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2215 0 ▶ my $text_part = ($text eq "Are you sure you want to proceed?" ? "" : $text);
Branch: 1 branch
BranchTrueFalseTotal
$text eq 'Are you sure you want to proceed?' ? : 0 0 0
2216 0 ▶ my $type_part = ($type eq "none" ? "" : $type);
Branch: 1 branch
BranchTrueFalseTotal
$type eq 'none' ? : 0 0 0
2217 0 ▶ my $title_part = ($title eq "Confirm" ? "" : $title);
Branch: 1 branch
BranchTrueFalseTotal
$title eq 'Confirm' ? : 0 0 0
2218 0 ▶ my $ok_part = ($ok_text eq "OK" ? "" : $ok_text);
Branch: 1 branch
BranchTrueFalseTotal
$ok_text eq 'OK' ? : 0 0 0
2219 0 ▶ my $cancel_part = ($cancel_text eq "Cancel" ? "" : $cancel_text);
Branch: 1 branch
BranchTrueFalseTotal
$cancel_text eq 'Cancel' ? : 0 0 0
2220
2221 0 $self->_add($prefix . "cf", $text_part . GS . $type_part . GS . $title_part . GS . $ok_part . GS . $cancel_part);
2222 0 return $self;
2223 }
2224
2225 0 ▶sub is_greater_than {
Subroutine is_greater_than: not called CC=3 SCAR=24.8
Pod undocumented
2226 0 my ($self, $first_value, $second_value, $interval) = @_;
2227 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2228 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2229 0 $self->_add($prefix . "gt", $first_value . GS . $second_value);
2230 0 return $self;
2231 }
2232
2233 0 ▶sub is_less_than {
Subroutine is_less_than: not called CC=3 SCAR=24.8
Pod undocumented
2234 0 my ($self, $first_value, $second_value, $interval) = @_;
2235 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2236 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2237 0 $self->_add($prefix . "lt", $first_value . GS . $second_value);
2238 0 return $self;
2239 }
2240
2241 0 ▶sub is_equal_to {
Subroutine is_equal_to: not called CC=3 SCAR=24.8
Pod undocumented
2242 0 my ($self, $first_value, $second_value, $interval) = @_;
2243 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2244 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2245 0 $self->_add($prefix . "et", $first_value . GS . $second_value);
2246 0 return $self;
2247 }
2248
2249 0 ▶sub is_not_equal_to {
Subroutine is_not_equal_to: not called CC=3 SCAR=24.8
Pod undocumented
2250 0 my ($self, $first_value, $second_value, $interval) = @_;
2251 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2252 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2253 0 $self->_add($prefix . "Nt", $first_value . GS . $second_value);
2254 0 return $self;
2255 }
2256
2257 0 ▶sub exist {
Subroutine exist: not called CC=3 SCAR=24.8
Pod undocumented
2258 0 my ($self, $value, $interval) = @_;
2259 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2260 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2261 0 $self->_add($prefix . "ex", $value);
2262 0 return $self;
2263 }
2264
2265 0 ▶sub not_exist {
Subroutine not_exist: not called CC=3 SCAR=24.8
Pod undocumented
2266 0 my ($self, $value, $interval) = @_;
2267 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2268 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2269 0 $self->_add($prefix . "nx", $value);
2270 0 return $self;
2271 }
2272
2273 0 ▶sub is_true {
Subroutine is_true: not called CC=3 SCAR=24.8
Pod undocumented
2274 0 my ($self, $value, $interval) = @_;
2275 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2276 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2277 0 $self->_add($prefix . "tr", $value);
2278 0 return $self;
2279 }
2280
2281 0 ▶sub is_false {
Subroutine is_false: not called CC=3 SCAR=24.8
Pod undocumented
2282 0 my ($self, $value, $interval) = @_;
2283 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2284 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2285 0 $self->_add($prefix . "fa", $value);
2286 0 return $self;
2287 }
2288
2289 0 ▶sub is_match_media {
Subroutine is_match_media: not called CC=3 SCAR=24.8
Pod undocumented
2290 0 my ($self, $value, $interval) = @_;
2291 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2292 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2293 0 $self->_add($prefix . "mm", $value);
2294 0 return $self;
2295 }
2296
2297 0 ▶sub is_not_match_media {
Subroutine is_not_match_media: not called CC=3 SCAR=24.8
Pod undocumented
2298 0 my ($self, $value, $interval) = @_;
2299 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2300 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2301 0 $self->_add($prefix . "nm", $value);
2302 0 return $self;
2303 }
2304
2305 0 ▶sub include {
Subroutine include: not called CC=3 SCAR=24.8
Pod undocumented
2306 0 my ($self, $text, $value, $interval) = @_;
2307 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2308 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2309 0 $self->_add($prefix . "In", $value . GS . $text);
2310 0 return $self;
2311 }
2312
2313 0 ▶sub not_include {
Subroutine not_include: not called CC=3 SCAR=24.8
Pod undocumented
2314 0 my ($self, $text, $value, $interval) = @_;
2315 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2316 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2317 0 $self->_add($prefix . "Nn", $value . GS . $text);
2318 0 return $self;
2319 }
2320
2321 0 ▶sub element_exists {
Subroutine element_exists: not called CC=3 SCAR=24.8
Pod undocumented
2322 0 my ($self, $input_place, $interval) = @_;
2323 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2324 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2325 0 $self->_add($prefix . "eE", $input_place);
2326 0 return $self;
2327 }
2328
2329 0 ▶sub element_not_exists {
Subroutine element_not_exists: not called CC=3 SCAR=24.8
Pod undocumented
2330 0 my ($self, $input_place, $interval) = @_;
2331 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2332 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2333 0 $self->_add($prefix . "nE", $input_place);
2334 0 return $self;
2335 }
2336
2337 0 ▶sub is_regex_match {
Subroutine is_regex_match: not called CC=3 SCAR=24.8
Pod undocumented
2338 0 my ($self, $value, $pattern, $interval) = @_;
2339 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2340 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2341 0 $self->_add($prefix . "re", $value . GS . $pattern);
2342 0 return $self;
2343 }
2344
2345 0 ▶sub is_regex_not_match {
Subroutine is_regex_not_match: not called CC=3 SCAR=24.8
Pod undocumented
2346 0 my ($self, $value, $pattern, $interval) = @_;
2347 0 ▶ $interval = -1 if !defined $interval;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $interval 0 0 0
2348 0 ▶ my $prefix = ($interval >= 0) ? "{(" . $interval . ")" : "{";
Branch: 1 branch
BranchTrueFalseTotal
$interval >= 0 ? : 0 0 0
2349 0 $self->_add($prefix . "rn", $value . GS . $pattern);
2350 0 return $self;
2351 }
2352
2353 # In: Everything Becomes A JSON List.
2354 # Key: Creates A Temporary Data In The Browser IndexedDB.
2355 # Key + "i" Creates A Temporary Data To Maintain The Loop Counter In The Browser IndexedDB.
2356 0 ▶sub for_each {
Subroutine for_each: not called CC=2 SCAR=17.9
Pod undocumented
2357 0 my ($self, $path, $in_val, $key) = @_;
2358 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
2359 0 $self->_add("{fe", $path . GS . $in_val . GS . $key);
2360 0 return $self;
2361 }
2362
2363 0 ▶sub break_ {
Subroutine break_: not called CC=1 SCAR=6.9
Pod undocumented
2364 0 my ($self) = @_;
2365 0 $self->_add(";");
2366 }
2367
2368 0 ▶sub else_ {
Subroutine else_: not called CC=1 SCAR=6.9
Pod undocumented
2369 0 my ($self) = @_;
2370 0 $self->_add("}e");
2371 0 return $self;
2372 }
2373
2374 0 ▶sub start_bracket {
Subroutine start_bracket: not called CC=1 SCAR=6.9
Pod undocumented
2375 0 my ($self) = @_;
2376 0 $self->_add("{");
2377 }
2378
2379 0 ▶sub end_bracket {
Subroutine end_bracket: not called CC=1 SCAR=6.9
Pod undocumented
2380 0 my ($self) = @_;
2381 0 $self->_add("}");
2382 }
2383
2384 # High-Level Methods
2385 # Used Then In Condition And Loop Methods
2386 0 ▶sub then {
Subroutine then: not called CC=5 SCAR=34.0
Pod undocumented
2387 0 my ($self, $new_form) = @_;
2388 0 ▶ return $self if !defined $new_form;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $new_form 0 0 0
2389
2390 0 my $data = $new_form->get_web_forms_data();
2391
2392 0 ▶ if (defined $data && $data ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $data and $data ne "") 0 0 0
Condition0%0/3
defined $data and $data ne ""
!ll&&!rl&&r
000
MC/DC0%0/2
defined $data and $data ne ""
defined $data $data ne ""
Truth table0%0/3
A and B
A= defined $dataB= $data ne ""
ABresult
0X0
100
111
2393 0 ▶ if ($data =~ /\n/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($data =~ /\n/u) 0 0 0
2394 0 $new_form->_add_to_up("{");
2395 0 $new_form->_add("}");
2396 }
2397 }
2398
2399 0 $self->append_form($new_form);
2400 0 return $self;
2401 }
2402
2403 0 ▶sub repeat {
Subroutine repeat: not called CC=6 SCAR=37.4
Pod undocumented
2404 0 my ($self, $new_form, $repeat, $index) = @_;
2405 0 ▶ return $self if !defined $new_form;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $new_form 0 0 0
2406
2407 0 ▶ if (defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $index) 0 0 0
2408 0 $self->go_to($index);
2409 0 $self->start_index($index);
2410 }
2411
2412 0 my $body_data = $new_form->get_web_forms_data();
2413 0 ▶ return $self if !defined $body_data || $body_data eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $body_data or $body_data eq "" 0 0 0
Condition0%0/3
not defined $body_data or $body_data eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $body_data or $body_data eq ""
not defined $body_data $body_data eq ""
Truth table0%0/3
not(A) or B
A= not defined $body_dataB= $body_data eq ""
ABresult
1X1
011
000
2414
2415 0 ▶ if (!defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $index) { } 0 0 0
2416 0 my @lines = split(/\n/, $body_data, -1);
2417 0 my $start_line = scalar(@lines) * -1;
2418 0 $self->append_form($new_form);
2419 0 $self->go_to("$start_line", $repeat - 1);
2420 } else {
2421 0 $self->append_form($new_form);
2422 0 $self->go_to($index, $repeat - 1);
2423 }
2424
2425 0 return $self;
2426 }
2427
2428 0 ▶sub isole {
Subroutine isole: not called CC=5 SCAR=34.0
Pod undocumented
2429 0 my ($self, $new_form, $input_place) = @_;
2430
2431 0 ▶ if (ref($new_form) eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $new_form eq "CODE") 0 0 0
2432 0 my $form = WebForms->new();
2433 0 $new_form->($form);
2434 0 return $self->isole($form, $input_place);
2435 }
2436
2437 0 ▶ return $self if !defined $new_form;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $new_form 0 0 0
2438
2439 0 my $body_data = $new_form->get_web_forms_data();
2440 0 ▶ return $self if !defined $body_data || $body_data eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $body_data or $body_data eq "" 0 0 0
Condition0%0/3
not defined $body_data or $body_data eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $body_data or $body_data eq ""
not defined $body_data $body_data eq ""
Truth table0%0/3
not(A) or B
A= not defined $body_dataB= $body_data eq ""
ABresult
1X1
011
000
2441
2442 0 my $form = WebForms->new();
2443 0 $form->start_transient_dom($input_place);
2444
2445 0 $self->append_form($form);
2446 0 $new_form->end_transient_dom();
2447 0 $self->append_form($new_form);
2448
2449 0 return $self;
2450 }
2451
2452 # The Render Method is Sensitive to DOM Changes; It is Recommended to Assign a Stable ID to the Selected Element.
2453 # This Method Utilizes the Transient DOM; Therefore, When Selecting InputPlaces, You Must Consider the Root of the Selected InputPlace Within the Method.
2454 0 ▶sub render {
Subroutine render: not called CC=9 SCAR=45.0
Pod undocumented
2455 0 my ($self, $new_form, $input_place, $key, $permanent) = @_;
2456
2457 0 ▶ if (ref($new_form) eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $new_form eq "CODE") 0 0 0
2458 0 my $form = WebForms->new();
2459 0 $new_form->($form);
2460 0 return $self->render($form, $input_place, $key, $permanent);
2461 }
2462
2463 0 ▶ $key = "" unless defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
2464 0 ▶ $permanent = 0 unless defined $permanent;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $permanent 0 0 0
2465
2466 0 ▶ return $self if !defined $new_form;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $new_form 0 0 0
2467
2468 0 my $body_data = $new_form->get_web_forms_data();
2469 0 ▶ return $self if !defined $body_data || $body_data eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $body_data or $body_data eq "" 0 0 0
Condition0%0/3
not defined $body_data or $body_data eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $body_data or $body_data eq ""
not defined $body_data $body_data eq ""
Truth table0%0/3
not(A) or B
A= not defined $body_dataB= $body_data eq ""
ABresult
1X1
011
000
2470
2471 0 ▶ $key = $input_place if $key eq "";
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "" 0 0 0
2472
2473 0 my $form = WebForms->new();
2474
2475 0 ▶ $form->exist($permanent ? Fetch::cache($key) : Fetch::save($key));
Branch: 1 branch
BranchTrueFalseTotal
$permanent ? : 0 0 0
2476 0 $form->rollback($input_place, $key, $permanent);
2477 0 $form->else_();
2478 0 $form->snapshot($input_place, $key, $permanent);
2479
2480 0 $form->start_transient_dom($input_place);
2481
2482 0 $self->append_form($form);
2483 0 $new_form->end_transient_dom();
2484 0 $self->append_form($new_form);
2485
2486 0 return $self;
2487 }
2488
2489 # Async
2490 # It Supports Brackets and Then
2491 0 ▶sub async_action {
Subroutine async_action: not called CC=1 SCAR=6.9
Pod undocumented
2492 0 my ($self) = @_;
2493 0 $self->_add("{(a)");
2494 0 return $self;
2495 }
2496
2497 0 ▶sub delay {
Subroutine delay: not called CC=1 SCAR=6.9
Pod undocumented
2498 0 my ($self, $milli_second) = @_;
2499 0 $self->_add("De", "$milli_second");
2500 }
2501
2502 # Option
2503 0 ▶sub change_option {
Subroutine change_option: not called CC=1 SCAR=6.9
Pod undocumented
2504 0 my ($self, $name, $value) = @_;
2505 0 $self->_add("co", $name . GS . $value);
2506 }
2507
2508 0 ▶sub reset_option {
Subroutine reset_option: not called CC=2 SCAR=17.9
Pod undocumented
2509 0 my ($self, $name) = @_;
2510 0 ▶ if (!defined $name) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $name) { } 0 0 0
2511 0 $self->_add("ro");
2512 } else {
2513 0 $self->_add("ro", $name);
2514 }
2515 }
2516
2517 # Format Storage
2518 0 ▶sub create_format_storage {
Subroutine create_format_storage: not called CC=1 SCAR=6.9
Pod undocumented
2519 0 my ($self, $key, $data) = @_;
2520 0 $self->_add(".C", $key . GS . $data);
2521 }
2522
2523 0 ▶sub delete_format_storage {
Subroutine delete_format_storage: not called CC=1 SCAR=6.9
Pod undocumented
2524 0 my ($self, $key) = @_;
2525 0 $self->_add(".D", $key);
2526 }
2527
2528 0 ▶sub add_json {
Subroutine add_json: not called CC=1 SCAR=6.9
Pod undocumented
2529 0 my ($self, $key, $path, $value) = @_;
2530 0 $self->_add(".a", $key . GS . "j" . GS . $value . GS . $path);
2531 }
2532
2533 # Name: For Support Attribute, Set Double At Sign (@@) Before Name.
2534 0 ▶sub add_xml {
Subroutine add_xml: not called CC=2 SCAR=17.9
Pod undocumented
2535 0 my ($self, $key, $path, $name, $value) = @_;
2536 0 ▶ $value = "" if !defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 0 0 0
2537 0 $self->_add(".a", $key . GS . "x" . GS . $name . GS . $value . GS . $path);
2538 }
2539
2540 0 ▶sub add_ini {
Subroutine add_ini: not called CC=3 SCAR=24.8
Pod undocumented
2541 0 my ($self, $key, $path, $value, $is_ini_like) = @_;
2542 0 ▶ $is_ini_like = 0 if !defined $is_ini_like;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $is_ini_like 0 0 0
2543 0 ▶ $self->_add(".a", $key . GS . "i" . GS . ($is_ini_like ? "1" : "0") . GS . $value . GS . $path);
Branch: 1 branch
BranchTrueFalseTotal
$is_ini_like ? : 0 0 0
2544 }
2545
2546 0 ▶sub add_text_line {
Subroutine add_text_line: not called CC=1 SCAR=6.9
Pod undocumented
2547 0 my ($self, $key, $line, $text) = @_;
2548 0 $self->_add(".a", $key . GS . "t" . GS . $text . GS . "$line");
2549 }
2550
2551 0 ▶sub add_variable {
Subroutine add_variable: not called CC=1 SCAR=6.9
Pod undocumented
2552 0 my ($self, $key, $value) = @_;
2553 0 $self->_add(".a", $key . GS . "v" . GS . $value);
2554 }
2555
2556 0 ▶sub update_json {
Subroutine update_json: not called CC=1 SCAR=6.9
Pod undocumented
2557 0 my ($self, $key, $path, $value) = @_;
2558 0 $self->_add(".u", $key . GS . "j" . GS . $value . GS . $path);
2559 }
2560
2561 0 ▶sub update_xml {
Subroutine update_xml: not called CC=1 SCAR=6.9
Pod undocumented
2562 0 my ($self, $key, $path, $value) = @_;
2563 0 $self->_add(".u", $key . GS . "x" . GS . $value . GS . $path);
2564 }
2565
2566 0 ▶sub update_ini {
Subroutine update_ini: not called CC=3 SCAR=24.8
Pod undocumented
2567 0 my ($self, $key, $path, $value, $is_ini_like) = @_;
2568 0 ▶ $is_ini_like = 0 if !defined $is_ini_like;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $is_ini_like 0 0 0
2569 0 ▶ $self->_add(".u", $key . GS . "i" . GS . ($is_ini_like ? "1" : "0") . GS . $value . GS . $path);
Branch: 1 branch
BranchTrueFalseTotal
$is_ini_like ? : 0 0 0
2570 }
2571
2572 # Note: C# original has a typo 'UpdateTexLine', mapped to 'update_text_line' for Perl standards while preserving exact logic.
2573 0 ▶sub update_text_line {
Subroutine update_text_line: not called CC=1 SCAR=6.9
Pod undocumented
2574 0 my ($self, $key, $line, $text) = @_;
2575 0 $self->_add(".u", $key . GS . "t" . GS . $text . GS . "$line");
2576 }
2577
2578 0 ▶sub update_variable {
Subroutine update_variable: not called CC=1 SCAR=6.9
Pod undocumented
2579 0 my ($self, $key, $value) = @_;
2580 0 $self->_add(".u", $key . GS . "v" . GS . $value);
2581 }
2582
2583 0 ▶sub increase_variable {
Subroutine increase_variable: not called CC=1 SCAR=6.9
Pod undocumented
2584 0 my ($self, $key, $value) = @_;
2585 0 $self->_add(".i", $key . GS . "v" . GS . "$value");
2586 }
2587
2588 0 ▶sub decrease_variable {
Subroutine decrease_variable: not called CC=1 SCAR=6.9
Pod undocumented
2589 0 my ($self, $key, $value) = @_;
2590 0 $self->increase_variable($key, $value * -1);
2591 }
2592
2593 0 ▶sub delete_json {
Subroutine delete_json: not called CC=1 SCAR=6.9
Pod undocumented
2594 0 my ($self, $key, $path) = @_;
2595 0 $self->_add(".d", $key . GS . "j" . GS . $path);
2596 }
2597
2598 0 ▶sub delete_xml {
Subroutine delete_xml: not called CC=1 SCAR=6.9
Pod undocumented
2599 0 my ($self, $key, $path) = @_;
2600 0 $self->_add(".d", $key . GS . "x" . GS . $path);
2601 }
2602
2603 0 ▶sub delete_ini {
Subroutine delete_ini: not called CC=3 SCAR=24.8
Pod undocumented
2604 0 my ($self, $key, $path, $is_ini_like) = @_;
2605 0 ▶ $is_ini_like = 0 if !defined $is_ini_like;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $is_ini_like 0 0 0
2606 0 ▶ $self->_add(".d", $key . GS . "i" . GS . ($is_ini_like ? "1" : "0") . GS . $path);
Branch: 1 branch
BranchTrueFalseTotal
$is_ini_like ? : 0 0 0
2607 }
2608
2609 0 ▶sub delete_text_line {
Subroutine delete_text_line: not called CC=1 SCAR=6.9
Pod undocumented
2610 0 my ($self, $key, $line) = @_;
2611 0 $self->_add(".d", $key . GS . "t" . GS . "$line");
2612 }
2613
2614 0 ▶sub delete_variable {
Subroutine delete_variable: not called CC=1 SCAR=6.9
Pod undocumented
2615 0 my ($self, $key) = @_;
2616 0 $self->_add(".d", $key . GS . "v");
2617 }
2618
2619 # Template Engine
2620 # Pattern Example: {{value}}, ((value)), *value*, $value;
2621 0 ▶sub bind_json_to_template {
Subroutine bind_json_to_template: not called CC=3 SCAR=24.8
Pod undocumented
2622 0 my ($self, $input_place, $json_text, $path, $pattern, $also_start_tag) = @_;
2623 0 ▶ $also_start_tag = 1 if !defined $also_start_tag;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $also_start_tag 0 0 0
2624 0 ▶ $self->_add("Tj" . $input_place, $json_text . GS . $path . GS . $pattern . GS . ($also_start_tag ? "1" : "0"));
Branch: 1 branch
BranchTrueFalseTotal
$also_start_tag ? : 0 0 0
2625 }
2626
2627 # Because XML Elements Are Lowercased, Placeholders Must Use Lowercase Names.
2628 0 ▶sub bind_xml_to_template {
Subroutine bind_xml_to_template: not called CC=3 SCAR=24.8
Pod undocumented
2629 0 my ($self, $input_place, $xml_text, $path, $pattern, $also_start_tag) = @_;
2630 0 ▶ $also_start_tag = 1 if !defined $also_start_tag;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $also_start_tag 0 0 0
2631 0 ▶ $self->_add("Tx" . $input_place, $xml_text . GS . $path . GS . $pattern . GS . ($also_start_tag ? "1" : "0"));
Branch: 1 branch
BranchTrueFalseTotal
$also_start_tag ? : 0 0 0
2632 }
2633
2634 0 ▶sub bind_ini_to_template {
Subroutine bind_ini_to_template: not called CC=3 SCAR=24.8
Pod undocumented
2635 0 my ($self, $input_place, $ini_text, $path, $pattern, $also_start_tag) = @_;
2636 0 ▶ $also_start_tag = 1 if !defined $also_start_tag;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $also_start_tag 0 0 0
2637 0 ▶ $self->_add("Ti" . $input_place, $ini_text . GS . $path . GS . $pattern . GS . ($also_start_tag ? "1" : "0"));
Branch: 1 branch
BranchTrueFalseTotal
$also_start_tag ? : 0 0 0
2638 }
2639
2640 # Inject
2641 # Need Add @: to First of String
2642 0 ▶sub inject {
Subroutine inject: not called CC=1 SCAR=6.9
Pod undocumented
2643 0 my ($self, $value) = @_;
2644 0 return "\$[" . $value . "];";
2645 }
2646
2647 # Action Control
2648 0 ▶sub replace_action_control {
Subroutine replace_action_control: not called CC=3 SCAR=24.8
Pod undocumented
2649 0 my ($self, $search_value, $value, $adding_to_up) = @_;
2650 0 ▶ $adding_to_up = 0 if !defined $adding_to_up;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $adding_to_up 0 0 0
2651 0 ▶ if ($adding_to_up) {
Branch: 1 branch
BranchTrueFalseTotal
if ($adding_to_up) { } 0 0 0
2652 0 $self->_add_to_up("rE", $search_value . GS . $value);
2653 } else {
2654 0 $self->_add("rE", $search_value . GS . $value);
2655 }
2656 }
2657
2658 0 ▶sub assign_replace {
Subroutine assign_replace: not called CC=5 SCAR=34.0
Pod undocumented
2659 0 my ($self, $search_value, $value, $index) = @_;
2660 0 ▶ $index = -1 if !defined $index;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $index 0 0 0
2661 0 my $current_line = $self->_get_line_by_index($index);
2662 0 ▶ return if !defined $current_line || $current_line eq "";
Branch: 1 branch
BranchTrueFalseTotal
if not defined $current_line or $current_line eq "" 0 0 0
Condition0%0/3
not defined $current_line or $current_line eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $current_line or $current_line eq ""
not defined $current_line $current_line eq ""
Truth table0%0/3
not(A) or B
A= not defined $current_lineB= $current_line eq ""
ABresult
1X1
011
000
2663
2664 0 my @parts = split(/=/, $current_line, 2);
2665 0 my $new_name = ";" . $search_value . GS . $value . GS . $parts[0];
2666 0 ▶ my $new_value = (scalar(@parts) > 1) ? $parts[1] : "";
Branch: 1 branch
BranchTrueFalseTotal
scalar @parts > 1 ? : 0 0 0
2667
2668 0 $self->_update_line_by_index($index, $new_name, $new_value);
2669 }
2670
2671 # Hash And Checksum
2672 0 ▶sub set_hash {
Subroutine set_hash: not called CC=1 SCAR=6.9
Pod undocumented
2673 0 my ($self) = @_;
2674 0 $self->_add("SH");
2675 }
2676
2677 0 ▶sub set_checksum {
Subroutine set_checksum: not called CC=1 SCAR=6.9
Pod undocumented
2678 0 my ($self) = @_;
2679 0 $self->_add("CS");
2680 }
2681
2682 0 ▶sub checksum_calculation {
Subroutine checksum_calculation: not called CC=2 SCAR=17.9
Pod undocumented
2683 0 my ($self, $text) = @_;
2684 0 my $sum = 0;
2685 0 my $mod = 65536;
2686 0 my $shift = 5;
2687
2688 0 foreach my $c (split(//, $text)) {
2689 0 $sum = ((($sum << $shift) | ($sum >> (16 - $shift))) ^ ord($c)) % $mod;
2690 }
2691
2692 0 return "$sum";
2693 }
2694
2695 0 ▶sub get_checksum {
Subroutine get_checksum: not called CC=1 SCAR=6.9
Pod undocumented
2696 0 my ($self) = @_;
2697 0 return $self->checksum_calculation($self->get_web_forms_data());
2698 }
2699
2700 # Get
2701 0 ▶sub get_forms_action_data {
Subroutine get_forms_action_data: not called CC=2 SCAR=17.9
Pod undocumented
2702 0 my ($self) = @_;
2703 0 ▶ return "" if length($self->{web_forms_data}) == 0;
Branch: 1 branch
BranchTrueFalseTotal
if length $self->{"web_forms_data"} == 0 0 0 0
2704 0 return $self->{web_forms_data};
2705 }
2706
2707 0 ▶sub response {
Subroutine response: not called CC=1 SCAR=6.9
Pod undocumented
2708 0 my ($self) = @_;
2709 0 return "[web-forms]\n" . $self->get_forms_action_data();
2710 }
2711
2712 0 ▶sub get_forms_action_data_line_break {
Subroutine get_forms_action_data_line_break: not called CC=2 SCAR=17.9
Pod undocumented
2713 0 my ($self) = @_;
2714 0 ▶ return "" if length($self->{web_forms_data}) == 0;
Branch: 1 branch
BranchTrueFalseTotal
if length $self->{"web_forms_data"} == 0 0 0 0
2715
2716 0 my $data = $self->{web_forms_data};
2717 0 my $processed_data = $data;
2718 0 $processed_data =~ s/"/\$[dq];/g;
2719 0 $processed_data =~ s/\n/\$[sln];/g;
2720 0 return $processed_data;
2721 }
2722
2723 # Export
2724 0 ▶sub export_to_html_comment {
Subroutine export_to_html_comment: not called CC=4 SCAR=30.0
Pod undocumented
2725 0 my ($self, $add_line) = @_;
2726 0 ▶ $add_line = 0 if !defined $add_line;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $add_line 0 0 0
2727 0 my $response_str = $self->response();
2728 0 $response_str =~ s/--/\$[dd];/g;
2729 0 ▶ if (substr($response_str, -1) eq '-') {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($response_str, -1) eq "-") 0 0 0
2730 0 $response_str = substr($response_str, 0, -1) . "\$[da];";
2731 }
2732
2733 0 ▶ return ($add_line ? "\n" : "") . "<!--" . $response_str . "-->";
Branch: 1 branch
BranchTrueFalseTotal
$add_line ? : 0 0 0
2734 }
2735
2736 # Using it for SSE Response
2737 0 ▶sub export_to_line_break {
Subroutine export_to_line_break: not called CC=1 SCAR=6.9
Pod undocumented
2738 0 my ($self, $src) = @_;
2739 0 return "[web-forms]\$[sln];" . $self->get_forms_action_data_line_break();
2740 }
2741
2742 0 ▶sub get_web_forms_data {
Subroutine get_web_forms_data: not called CC=1 SCAR=6.9
Pod undocumented
2743 0 my ($self) = @_;
2744 0 return $self->{web_forms_data};
2745 }
2746
2747 0 ▶sub append_form {
Subroutine append_form: not called CC=5 SCAR=34.0
Pod undocumented
2748 0 my ($self, $form) = @_;
2749 0 ▶ return if !defined $form;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $form 0 0 0
2750
2751 0 my $other_data = $form->get_web_forms_data();
2752 0 ▶ if (defined $other_data && $other_data ne "") {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $other_data and $other_data ne "") 0 0 0
Condition0%0/3
defined $other_data and $other_data ne ""
!ll&&!rl&&r
000
MC/DC0%0/2
defined $other_data and $other_data ne ""
defined $other_data $other_data ne ""
Truth table0%0/3
A and B
A= defined $other_dataB= $other_data ne ""
ABresult
0X0
100
111
2753 0 ▶ if (length($self->{web_forms_data}) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $self->{"web_forms_data"} > 0) 0 0 0
2754 0 $self->{web_forms_data} .= "\n";
2755 }
2756 0 $self->{web_forms_data} .= $other_data;
2757 }
2758 }
2759
2760 0 ▶sub clean {
Subroutine clean: not called CC=1 SCAR=6.9
Pod undocumented
2761 0 my ($self) = @_;
2762 0 $self->{web_forms_data} = "";
2763 }
2764
2765 package Security;
2766 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2767 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2768 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2769
2770 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
2771 0 my ($class) = @_;
2772 0 my $self = {};
2773 0 bless $self, $class;
2774 0 return $self;
2775 }
2776
2777 0 ▶sub safe_value {
Subroutine safe_value: not called CC=3 SCAR=24.8
2778 0 my ($self, $value) = @_;
2779 0 ▶ return $value if length($value) < 1;
Branch: 1 branch
BranchTrueFalseTotal
if length $value < 1 0 0 0
2780
2781 0 ▶ $value = '@' . $value if substr($value, 0, 1) eq '@';
Branch: 1 branch
BranchTrueFalseTotal
if substr($value, 0, 1) eq "\@" 0 0 0
2782
2783 0 $value =~ s/\n/\$[ln];/g;
2784 0 $value =~ s/,@/\$[co];@/g;
2785 0 $value =~ s/\x{1c}/\0/g;
2786 0 $value =~ s/\x{1d}/\0/g;
2787 0 $value =~ s/\x{1e}/\0/g;
2788 0 $value =~ s/\x{1f}/\0/g;
2789
2790 0 return $value;
2791 }
2792
2793 # WebForms Place Criteria (WPC) DSL
2794 package InputPlace;
2795 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2796 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2797 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2798
2799 1 ▶use constant Document => ",";
Subroutine BEGIN: called CC=1 SCAR=0.0
2800 1 ▶use constant Window => "`";
Subroutine BEGIN: called CC=1 SCAR=0.0
2801 # When Calling TransientDOM, Using Root will Result in the Selection of the Transient Tag.
2802 1 ▶use constant Root => "~";
Subroutine BEGIN: called CC=1 SCAR=0.0
2803 1 ▶use constant HTML => ".";
Subroutine BEGIN: called CC=1 SCAR=0.0
2804 1 ▶use constant Head => "^";
Subroutine BEGIN: called CC=1 SCAR=0.0
2805 1 ▶use constant ScreenOrientation => "%";
Subroutine BEGIN: called CC=1 SCAR=0.0
2806 1 ▶use constant All => "*";
Subroutine BEGIN: called CC=1 SCAR=0.0
2807 1 ▶use constant Parent => "/";
Subroutine BEGIN: called CC=1 SCAR=0.0
2808 1 ▶use constant Current => '$';
Subroutine BEGIN: called CC=1 SCAR=0.0
2809 1 ▶use constant Target => "!";
Subroutine BEGIN: called CC=1 SCAR=0.0
2810 1 ▶use constant Upper => "-";
Subroutine BEGIN: called CC=1 SCAR=0.0
2811
2812 0 ▶sub id {
Subroutine id: not called CC=1 SCAR=6.9
2813 0 my ($id_val) = @_;
2814 0 return $id_val;
2815 }
2816
2817 0 ▶sub name {
Subroutine name: not called CC=2 SCAR=17.9
2818 0 my ($name_val, $index) = @_;
2819 0 ▶ if (!defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $index) { } 0 0 0
2820 0 return '(' . $name_val . ')';
2821 } else {
2822 0 return '(' . $name_val . ')' . $index;
2823 }
2824 }
2825
2826 0 ▶sub all_names {
Subroutine all_names: not called CC=1 SCAR=6.9
2827 0 my ($name_val) = @_;
2828 0 return "(" . $name_val . ")*";
2829 }
2830
2831 0 ▶sub tag {
Subroutine tag: not called CC=2 SCAR=17.9
2832 0 my ($tag_val, $index) = @_;
2833 0 ▶ if (!defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $index) { } 0 0 0
2834 0 return '<' . $tag_val . '>';
2835 } else {
2836 0 return '<' . $tag_val . '>' . $index;
2837 }
2838 }
2839
2840 0 ▶sub all_tags {
Subroutine all_tags: not called CC=1 SCAR=6.9
2841 0 my ($tag_val) = @_;
2842 0 return "<" . $tag_val . ">*";
2843 }
2844
2845 0 ▶sub child {
Subroutine child: not called CC=2 SCAR=17.9
2846 0 my ($index) = @_;
2847 0 ▶ if (!defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $index) { } 0 0 0
2848 0 return "<>";
2849 } else {
2850 0 return "<>" . $index;
2851 }
2852 }
2853
2854 0 ▶sub all_child {
Subroutine all_child: not called CC=1 SCAR=6.9
2855 0 my ($class) = @_;
2856 0 return "<>*";
2857 }
2858
2859 0 ▶sub class_name {
Subroutine class_name: not called CC=2 SCAR=17.9
2860 0 my ($class_val, $index) = @_;
2861 0 ▶ if (!defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $index) { } 0 0 0
2862 0 return '{' . $class_val . '}';
2863 } else {
2864 0 return '{' . $class_val . '}' . $index;
2865 }
2866 }
2867
2868 0 ▶sub all_classes {
Subroutine all_classes: not called CC=1 SCAR=6.9
2869 0 my ($class_val) = @_;
2870 0 return "{" . $class_val . "}*";
2871 }
2872
2873 0 ▶sub attribute {
Subroutine attribute: not called CC=8 SCAR=42.8
2874 0 my ($name_val, $value_or_index, $operator_or_nil, $index) = @_;
2875 0 ▶ if (!defined $value_or_index) {
Branch: 2 branches
BranchTrueFalseTotal
if (not defined $value_or_index) { } 0 0 0
elsif (not defined $index and !defined($operator_or_nil) || $operator_or_nil eq "\000") { } 0 0 0
2876 0 return '"' . $name_val . '"';
2877 ▶ } elsif (!defined $index && (!defined $operator_or_nil || $operator_or_nil eq "\0")) {
Condition0%0/6
not defined $index and !defined($operator_or_nil) || $operator_or_nil eq "\0"
!ll&&!rl&&r
000
not defined $operator_or_nil or $operator_or_nil eq "\0"
l!l&&r!l&&!r
000
MC/DC0%0/3
not defined $index and !defined($operator_or_nil) || $operator_or_nil eq "\0"
not defined $index not defined $operator_or_nil $operator_or_nil eq "\0"
Truth table0%0/4
not(A) and not(B) or C
A= not defined $indexB= not defined $operator_or_nilC= $operator_or_nil eq "\0"
ABCresult
0XX0
1000
11X1
1011
2878 0 return '"' . $name_val . '"' . $value_or_index;
2879 } else {
2880 0 ▶ my $op = (!defined $operator_or_nil || $operator_or_nil eq "\0") ? "" : $operator_or_nil;
Branch: 1 branch
BranchTrueFalseTotal
!defined($operator_or_nil) || $operator_or_nil eq "\000" ? : 0 0 0
Condition0%0/3
not defined $operator_or_nil or $operator_or_nil eq "\0"
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $operator_or_nil or $operator_or_nil eq "\0"
not defined $operator_or_nil $operator_or_nil eq "\0"
Truth table0%0/3
not(A) or B
A= not defined $operator_or_nilB= $operator_or_nil eq "\0"
ABresult
1X1
011
000
2881 0 ▶ if (!defined $index) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $index) { } 0 0 0
2882 0 return '"' . $name_val . $op . "'" . $value_or_index . '"';
2883 } else {
2884 0 return '"' . $name_val . $op . "'" . $value_or_index . '"' . $index;
2885 }
2886 }
2887 }
2888
2889 0 ▶sub all_attributes {
Subroutine all_attributes: not called CC=4 SCAR=30.0
2890 0 my ($name_val, $value, $operator) = @_;
2891 0 ▶ if (!defined $value) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $value) { } 0 0 0
2892 0 return "\"" . $name_val . "\"*";
2893 } else {
2894 0 ▶ my $op = (!defined $operator || $operator eq "\0") ? "" : $operator;
Branch: 1 branch
BranchTrueFalseTotal
!defined($operator) || $operator eq "\000" ? : 0 0 0
Condition0%0/3
not defined $operator or $operator eq "\0"
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $operator or $operator eq "\0"
not defined $operator $operator eq "\0"
Truth table0%0/3
not(A) or B
A= not defined $operatorB= $operator eq "\0"
ABresult
1X1
011
000
2895 0 return "\"" . $name_val . $op . "'" . $value . "\"*";
2896 }
2897 }
2898
2899 0 ▶sub query {
Subroutine query: not called CC=1 SCAR=6.9
2900 0 my ($query_val) = @_;
2901 0 my $res = $query_val;
2902 0 $res =~ s/=/\$[eq];/g;
2903 0 $res =~ s/\|/\$[vb];/g;
2904 0 $res =~ s/\?/\$[qu];/g;
2905 0 return "*" . $res;
2906 }
2907
2908 0 ▶sub query_all {
Subroutine query_all: not called CC=1 SCAR=6.9
2909 0 my ($query_val) = @_;
2910 0 my $res = $query_val;
2911 0 $res =~ s/=/\$[eq];/g;
2912 0 $res =~ s/\|/\$[vb];/g;
2913 0 $res =~ s/\?/\$[qu];/g;
2914 0 return "[" . $res;
2915 }
2916
2917 package OutputPlace;
2918 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2919 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2920 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2921 1 ▶use parent -norequire, 'InputPlace';
Subroutine BEGIN: called CC=1 SCAR=0.0
2922
2923 # Do not Add any Data Before or After it
2924 package Fetch;
2925 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2926 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
2927 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2928
2929 1 ▶use constant RS => chr(30);
Subroutine BEGIN: called CC=1 SCAR=0.0
2930 1 ▶use constant US => chr(31);
Subroutine BEGIN: called CC=1 SCAR=0.0
2931
2932 # Method
2933 0 ▶sub random {
Subroutine random: not called CC=2 SCAR=17.9
2934 0 my ($max_value, $min_value) = @_;
2935 0 ▶ if (!defined $min_value) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $min_value) { } 0 0 0
2936 0 return '@mr' . $max_value;
2937 } else {
2938 0 return '@mr' . $max_value . RS . $min_value;
2939 }
2940 }
2941
2942 0 ▶sub space_to_char {
Subroutine space_to_char: not called CC=2 SCAR=17.9
2943 0 my ($text, $character) = @_;
2944 0 ▶ $character = "-" if !defined $character;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $character 0 0 0
2945 0 return '@sc' . $character . RS . $text;
2946 }
2947
2948 0 ▶sub encode_uri {
Subroutine encode_uri: not called CC=1 SCAR=6.9
2949 0 my ($text) = @_;
2950 0 return '@ue' . $text;
2951 }
2952
2953 0 ▶sub decode_uri {
Subroutine decode_uri: not called CC=1 SCAR=6.9
2954 0 my ($text) = @_;
2955 0 return '@ud' . $text;
2956 }
2957
2958 0 ▶sub method {
Subroutine method: not called CC=4 SCAR=30.0
2959 0 my ($method_name, $args) = @_;
2960 0 my $return_value = '@cm' . $method_name;
2961 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
2962 0 $return_value .= RS . join(US, @$args);
2963 }
2964 0 return $return_value;
2965 }
2966
2967 0 ▶sub module_method {
Subroutine module_method: not called CC=4 SCAR=30.0
2968 0 my ($method_name, $args) = @_;
2969 0 my $return_value = '@cM' . $method_name;
2970 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
2971 0 $return_value .= RS . join(US, @$args);
2972 }
2973 0 return $return_value;
2974 }
2975
2976 # MethodName: The Method Name May Need to Include the Class Name, Separated by a Period. Example: MyClassName.MyMethodName
2977 0 ▶sub wasm_method {
Subroutine wasm_method: not called CC=4 SCAR=30.0
2978 0 my ($wasm_language, $wasm_url, $method_name, $args) = @_;
2979 0 my $return_value = '@wA' . $wasm_language . RS . $wasm_url . RS . $method_name;
2980 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
2981 0 $return_value .= RS . join(US, @$args);
2982 }
2983 0 return $return_value;
2984 }
2985
2986 0 ▶sub script {
Subroutine script: not called CC=1 SCAR=6.9
2987 0 my ($script_text) = @_;
2988 0 $script_text =~ s/\n/\$[ln];/g;
2989 0 return '@_' . $script_text;
2990 }
2991
2992 0 ▶sub load_url {
Subroutine load_url: not called CC=3 SCAR=24.8
2993 0 my ($url, $fetch_script) = @_;
2994 0 ▶ $fetch_script = 0 if !defined $fetch_script;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $fetch_script 0 0 0
2995 0 ▶ return '@lu' . $url . ($fetch_script ? RS . "1" : "");
Branch: 1 branch
BranchTrueFalseTotal
$fetch_script ? : 0 0 0
2996 }
2997
2998 0 ▶sub load_html {
Subroutine load_html: not called CC=5 SCAR=34.0
2999 0 my ($url, $fetch_input_place, $fetch_script) = @_;
3000 0 ▶ $fetch_input_place = "" if !defined $fetch_input_place;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $fetch_input_place 0 0 0
3001 0 ▶ $fetch_script = 0 if !defined $fetch_script;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $fetch_script 0 0 0
3002 0 ▶ my $fetch_input_part = ($fetch_input_place ne "") ? RS . $fetch_input_place : "";
Branch: 1 branch
BranchTrueFalseTotal
$fetch_input_place ne '' ? : 0 0 0
3003 0 ▶ return '@lh' . $url . RS . ($fetch_script ? "1" : "0") . $fetch_input_part;
Branch: 1 branch
BranchTrueFalseTotal
$fetch_script ? : 0 0 0
3004 }
3005
3006 0 ▶sub load_line {
Subroutine load_line: not called CC=1 SCAR=6.9
3007 0 my ($url, $line) = @_;
3008 0 return '@ll' . $url . RS . $line;
3009 }
3010
3011 0 ▶sub load_ini {
Subroutine load_ini: not called CC=3 SCAR=24.8
3012 0 my ($url, $name, $is_ini_like) = @_;
3013 0 ▶ $is_ini_like = 0 if !defined $is_ini_like;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $is_ini_like 0 0 0
3014 0 ▶ return '@li' . $url . RS . $name . ($is_ini_like ? RS . "1" : "");
Branch: 1 branch
BranchTrueFalseTotal
$is_ini_like ? : 0 0 0
3015 }
3016
3017 # Name: Name Or Nested Paths. Is Supprt Index (Student[8].Name). Nested Paths Index Starts At 0
3018 0 ▶sub load_json {
Subroutine load_json: not called CC=1 SCAR=6.9
3019 0 my ($url, $name) = @_;
3020 0 return '@lj' . $url . RS . $name;
3021 }
3022
3023 # Name: Name Or XPath; XPath Index Starts At 1
3024 0 ▶sub load_xml {
Subroutine load_xml: not called CC=1 SCAR=6.9
3025 0 my ($url, $name) = @_;
3026 0 return '@lx' . $url . RS . $name;
3027 }
3028
3029 # MethodName: It's Check Function Or Variable
3030 0 ▶sub has_method {
Subroutine has_method: not called CC=1 SCAR=6.9
3031 0 my ($method_name) = @_;
3032 0 return '@hm' . $method_name;
3033 }
3034
3035 0 ▶sub has_module_method {
Subroutine has_module_method: not called CC=1 SCAR=6.9
3036 0 my ($method_name) = @_;
3037 0 return '@hM' . $method_name;
3038 }
3039
3040 # This Method Return True Or False If Key Pressed
3041 # Modifier: Alt, AltGraph, Control, Meta, Shift, CapsLock, NumLock, ScrollLock
3042 0 ▶sub get_modifier_state {
Subroutine get_modifier_state: not called CC=1 SCAR=6.9
3043 0 my ($modifier) = @_;
3044 0 return '@ms' . $modifier;
3045 }
3046
3047 # Math
3048 0 ▶sub math {
Subroutine math: not called CC=4 SCAR=30.0
3049 0 my ($method_name, $args) = @_;
3050 0 my $return_value = '@M#' . $method_name;
3051 0 ▶ if (defined $args && ref($args) eq 'ARRAY' && scalar(@$args) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and ref $args eq "ARRAY" and scalar @$args > 0) 0 0 0
Condition0%0/6
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
!ll&&!rl&&r
000
defined $args and ref $args eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/3
defined $args and ref $args eq "ARRAY" and scalar @$args > 0
defined $args ref $args eq "ARRAY" scalar @$args > 0
Truth table0%0/4
A and B and C
A= defined $argsB= ref $args eq "ARRAY"C= scalar @$args > 0
ABCresult
0XX0
10X0
1100
1111
3052 0 $return_value .= RS . join(US, @$args);
3053 }
3054 0 return $return_value;
3055 }
3056
3057 # Date
3058 1 ▶use constant DateYear => '@dy';
Subroutine BEGIN: called CC=1 SCAR=0.0
3059 # Month In JavaScript Is Start From Index 0, Month In WebForms Core Is Start From Index 1
3060 1 ▶use constant DateMonth => '@dm';
Subroutine BEGIN: called CC=1 SCAR=0.0
3061 1 ▶use constant DateDay => '@dd';
Subroutine BEGIN: called CC=1 SCAR=0.0
3062 1 ▶use constant DateDate => '@dD';
Subroutine BEGIN: called CC=1 SCAR=0.0
3063 1 ▶use constant DateHours => '@dh';
Subroutine BEGIN: called CC=1 SCAR=0.0
3064 1 ▶use constant DateMinutes => '@di';
Subroutine BEGIN: called CC=1 SCAR=0.0
3065 1 ▶use constant DateSeconds => '@ds';
Subroutine BEGIN: called CC=1 SCAR=0.0
3066 1 ▶use constant DateMilliseconds => '@dl';
Subroutine BEGIN: called CC=1 SCAR=0.0
3067
3068 # String
3069 1 ▶use constant Space => '@sp';
Subroutine BEGIN: called CC=1 SCAR=0.0
3070 1 ▶use constant AtSign => '@sa';
Subroutine BEGIN: called CC=1 SCAR=0.0
3071
3072 # Tag
3073 0 ▶sub get_id {
Subroutine get_id: not called CC=1 SCAR=6.9
3074 0 my ($input_place) = @_;
3075 0 return '@$i' . $input_place;
3076 }
3077
3078 0 ▶sub get_name {
Subroutine get_name: not called CC=1 SCAR=6.9
3079 0 my ($input_place) = @_;
3080 0 return '@$n' . $input_place;
3081 }
3082
3083 0 ▶sub get_value {
Subroutine get_value: not called CC=1 SCAR=6.9
3084 0 my ($input_place) = @_;
3085 0 return '@$v' . $input_place;
3086 }
3087
3088 0 ▶sub get_value_length {
Subroutine get_value_length: not called CC=1 SCAR=6.9
3089 0 my ($input_place) = @_;
3090 0 return '@$e' . $input_place;
3091 }
3092
3093 0 ▶sub get_class {
Subroutine get_class: not called CC=1 SCAR=6.9
3094 0 my ($input_place) = @_;
3095 0 return '@$c' . $input_place;
3096 }
3097
3098 0 ▶sub get_style {
Subroutine get_style: not called CC=1 SCAR=6.9
3099 0 my ($input_place) = @_;
3100 0 return '@$s' . $input_place;
3101 }
3102
3103 0 ▶sub get_title {
Subroutine get_title: not called CC=1 SCAR=6.9
3104 0 my ($input_place) = @_;
3105 0 return '@$l' . $input_place;
3106 }
3107
3108 0 ▶sub get_label {
Subroutine get_label: not called CC=1 SCAR=6.9
3109 0 my ($input_place) = @_;
3110 0 return '@$A' . $input_place;
3111 }
3112
3113 0 ▶sub get_text {
Subroutine get_text: not called CC=1 SCAR=6.9
3114 0 my ($input_place) = @_;
3115 0 return '@$t' . $input_place;
3116 }
3117
3118 0 ▶sub get_outer_text {
Subroutine get_outer_text: not called CC=1 SCAR=6.9
3119 0 my ($input_place) = @_;
3120 0 return '@$o' . $input_place;
3121 }
3122
3123 0 ▶sub get_text_length {
Subroutine get_text_length: not called CC=1 SCAR=6.9
3124 0 my ($input_place) = @_;
3125 0 return '@$g' . $input_place;
3126 }
3127
3128 0 ▶sub get_attribute {
Subroutine get_attribute: not called CC=1 SCAR=6.9
3129 0 my ($input_place, $attribute) = @_;
3130 0 return '@$a' . $input_place . RS . $attribute;
3131 }
3132
3133 0 ▶sub get_width {
Subroutine get_width: not called CC=1 SCAR=6.9
3134 0 my ($input_place) = @_;
3135 0 return '@$w' . $input_place;
3136 }
3137
3138 0 ▶sub get_height {
Subroutine get_height: not called CC=1 SCAR=6.9
3139 0 my ($input_place) = @_;
3140 0 return '@$h' . $input_place;
3141 }
3142
3143 0 ▶sub get_is_read_only {
Subroutine get_is_read_only: not called CC=1 SCAR=6.9
3144 0 my ($input_place) = @_;
3145 0 return '@$r' . $input_place;
3146 }
3147
3148 0 ▶sub get_selected_index {
Subroutine get_selected_index: not called CC=1 SCAR=6.9
3149 0 my ($input_place) = @_;
3150 0 return '@$x' . $input_place;
3151 }
3152
3153 0 ▶sub get_index {
Subroutine get_index: not called CC=1 SCAR=6.9
3154 0 my ($input_place) = @_;
3155 0 return '@$I' . $input_place;
3156 }
3157
3158 0 ▶sub get_text_align {
Subroutine get_text_align: not called CC=1 SCAR=6.9
3159 0 my ($input_place) = @_;
3160 0 return '@$T' . $input_place;
3161 }
3162
3163 0 ▶sub get_node_length {
Subroutine get_node_length: not called CC=1 SCAR=6.9
3164 0 my ($input_place) = @_;
3165 0 return '@$L' . $input_place;
3166 }
3167
3168 0 ▶sub get_is_visible {
Subroutine get_is_visible: not called CC=1 SCAR=6.9
3169 0 my ($input_place) = @_;
3170 0 return '@$V' . $input_place;
3171 }
3172
3173 0 ▶sub get_tag_hash {
Subroutine get_tag_hash: not called CC=1 SCAR=6.9
3174 0 my ($input_place) = @_;
3175 0 return '@$H' . $input_place;
3176 }
3177
3178 # Save and Cache
3179 0 ▶sub has_hash {
Subroutine has_hash: not called CC=1 SCAR=6.9
3180 0 my ($hash_val) = @_;
3181 0 return '@HH' . $hash_val;
3182 }
3183
3184 0 ▶sub cookie {
Subroutine cookie: not called CC=1 SCAR=6.9
3185 0 my ($key) = @_;
3186 0 return '@co' . $key;
3187 }
3188
3189 0 ▶sub save {
Subroutine save: not called CC=3 SCAR=24.8
3190 0 my ($key, $replace_value) = @_;
3191 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3192 0 ▶ if (!defined $replace_value) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $replace_value) { } 0 0 0
3193 0 return '@cs' . $key;
3194 } else {
3195 0 return '@cs' . $key . RS . $replace_value;
3196 }
3197 }
3198
3199 0 ▶sub save_then_remove {
Subroutine save_then_remove: not called CC=1 SCAR=6.9
3200 0 my ($key) = @_;
3201 0 return '@cl' . $key;
3202 }
3203
3204 0 ▶sub save_length {
Subroutine save_length: not called CC=2 SCAR=17.9
3205 0 my ($key) = @_;
3206 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3207 0 return '@cg' . $key;
3208 }
3209
3210 0 ▶sub cache {
Subroutine cache: not called CC=3 SCAR=24.8
3211 0 my ($key, $replace_value) = @_;
3212 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3213 0 ▶ if (!defined $replace_value) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $replace_value) { } 0 0 0
3214 0 return '@cd' . $key;
3215 } else {
3216 0 return '@cd' . $key . RS . $replace_value;
3217 }
3218 }
3219
3220 0 ▶sub cache_then_remove {
Subroutine cache_then_remove: not called CC=1 SCAR=6.9
3221 0 my ($key) = @_;
3222 0 return '@ct' . $key;
3223 }
3224
3225 0 ▶sub cache_length {
Subroutine cache_length: not called CC=2 SCAR=17.9
3226 0 my ($key) = @_;
3227 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3228 0 return '@cG' . $key;
3229 }
3230
3231 0 ▶sub save_line {
Subroutine save_line: not called CC=3 SCAR=24.8
3232 0 my ($key, $line) = @_;
3233 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3234 0 ▶ $line = 0 if !defined $line;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $line 0 0 0
3235 0 return '@lL' . $key . "[" . $line;
3236 }
3237
3238 0 ▶sub save_line_consume {
Subroutine save_line_consume: not called CC=2 SCAR=17.9
3239 0 my ($key) = @_;
3240 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3241 0 return '@lL' . $key;
3242 }
3243
3244 # INIKey: Only Direct Key is Supported
3245 0 ▶sub save_ini {
Subroutine save_ini: not called CC=1 SCAR=6.9
3246 0 my ($key, $ini_key) = @_;
3247 0 return '@lI' . $key . "[" . $ini_key;
3248 }
3249
3250 0 ▶sub cache_line {
Subroutine cache_line: not called CC=3 SCAR=24.8
3251 0 my ($key, $line) = @_;
3252 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3253 0 ▶ $line = 0 if !defined $line;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $line 0 0 0
3254 0 return '@dL' . $key . "[" . $line;
3255 }
3256
3257 0 ▶sub cache_line_consume {
Subroutine cache_line_consume: not called CC=2 SCAR=17.9
3258 0 my ($key) = @_;
3259 0 ▶ $key = "." if !defined $key;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key 0 0 0
3260 0 return '@dL' . $key;
3261 }
3262
3263 # INIKey: Only Direct Key is Supported
3264 0 ▶sub cache_ini {
Subroutine cache_ini: not called CC=1 SCAR=6.9
3265 0 my ($key, $ini_key) = @_;
3266 0 return '@dI' . $key . "[" . $ini_key;
3267 }
3268
3269 # Format Storage
3270 0 ▶sub format_store {
Subroutine format_store: not called CC=1 SCAR=6.9
3271 0 my ($key) = @_;
3272 0 return '@fr' . $key;
3273 }
3274
3275 0 ▶sub format_store_by_xml_query {
Subroutine format_store_by_xml_query: not called CC=1 SCAR=6.9
3276 0 my ($key, $xpath) = @_;
3277 0 return '@fx' . $key . RS . $xpath;
3278 }
3279
3280 0 ▶sub format_store_by_json_query {
Subroutine format_store_by_json_query: not called CC=1 SCAR=6.9
3281 0 my ($key, $query) = @_;
3282 0 return '@fj' . $key . RS . $query;
3283 }
3284
3285 0 ▶sub format_store_by_ini {
Subroutine format_store_by_ini: not called CC=1 SCAR=6.9
3286 0 my ($key, $name) = @_;
3287 0 return '@fi' . $key . RS . $name;
3288 }
3289
3290 0 ▶sub format_store_by_text {
Subroutine format_store_by_text: not called CC=1 SCAR=6.9
3291 0 my ($key, $line) = @_;
3292 0 return '@ft' . $key . RS . $line;
3293 }
3294
3295 0 ▶sub format_store_by_variable {
Subroutine format_store_by_variable: not called CC=1 SCAR=6.9
3296 0 my ($key) = @_;
3297 0 return '@fv' . $key;
3298 }
3299
3300 # State
3301 0 ▶sub has_state {
Subroutine has_state: not called CC=1 SCAR=6.9
3302 0 my ($path) = @_;
3303 0 return '@hs' . $path;
3304 }
3305
3306 # SSE
3307 0 ▶sub sse_is_connected {
Subroutine sse_is_connected: not called CC=1 SCAR=6.9
3308 0 my ($path) = @_;
3309 0 return '@Sc' . $path;
3310 }
3311
3312 # WebSockets
3313 0 ▶sub web_sockets_is_connected {
Subroutine web_sockets_is_connected: not called CC=2 SCAR=17.9
3314 0 my ($path) = @_;
3315 0 ▶ $path = "" if !defined $path;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $path 0 0 0
3316 0 return '@Wc' . $path;
3317 }
3318
3319 # Document
3320 1 ▶use constant TabIsActive => '@da';
Subroutine BEGIN: called CC=1 SCAR=0.0
3321
3322 # Window
3323 1 ▶use constant Href => '@wf';
Subroutine BEGIN: called CC=1 SCAR=0.0
3324 1 ▶use constant PathName => '@wP';
Subroutine BEGIN: called CC=1 SCAR=0.0
3325
3326 0 ▶sub query {
Subroutine query: not called CC=2 SCAR=17.9
3327 0 my ($name) = @_;
3328 0 ▶ $name = "*" if !defined $name;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $name 0 0 0
3329 0 return '@wq' . $name;
3330 }
3331
3332 1 ▶use constant Hash => '@wh';
Subroutine BEGIN: called CC=1 SCAR=0.0
3333 1 ▶use constant Host => '@wH';
Subroutine BEGIN: called CC=1 SCAR=0.0
3334 1 ▶use constant HostName => '@wn';
Subroutine BEGIN: called CC=1 SCAR=0.0
3335 1 ▶use constant Port => '@wT';
Subroutine BEGIN: called CC=1 SCAR=0.0
3336 1 ▶use constant Origin => '@wo';
Subroutine BEGIN: called CC=1 SCAR=0.0
3337 1 ▶use constant GetSelection => '@ws';
Subroutine BEGIN: called CC=1 SCAR=0.0
3338 1 ▶use constant ScrollX => '@wx';
Subroutine BEGIN: called CC=1 SCAR=0.0
3339 1 ▶use constant ScrollY => '@wy';
Subroutine BEGIN: called CC=1 SCAR=0.0
3340
3341 0 ▶sub segment {
Subroutine segment: not called CC=1 SCAR=6.9
3342 0 my ($index) = @_;
3343 0 return '@wS' . $index;
3344 }
3345
3346 # It Only Works when the String Starts with the Tilde Character (~). The Path is Also Separated by the Slash Character (/). #~/Segment1/Segment2/Segment3
3347 0 ▶sub hash_segment {
Subroutine hash_segment: not called CC=1 SCAR=6.9
3348 0 my ($index) = @_;
3349 0 return '@wt' . $index;
3350 }
3351
3352 # Navigator
3353 1 ▶use constant ClipboardText => '@nC';
Subroutine BEGIN: called CC=1 SCAR=0.0
3354 1 ▶use constant GeoLatitude => '@nW';
Subroutine BEGIN: called CC=1 SCAR=0.0
3355 1 ▶use constant GeoLongitude => '@nO';
Subroutine BEGIN: called CC=1 SCAR=0.0
3356 1 ▶use constant Language => '@nL';
Subroutine BEGIN: called CC=1 SCAR=0.0
3357 1 ▶use constant IsOnLine => '@no';
Subroutine BEGIN: called CC=1 SCAR=0.0
3358 1 ▶use constant UserAgent => '@na';
Subroutine BEGIN: called CC=1 SCAR=0.0
3359
3360 # Screen
3361 1 ▶use constant ScreenWidth => '@sw';
Subroutine BEGIN: called CC=1 SCAR=0.0
3362 1 ▶use constant ScreenHeight => '@sh';
Subroutine BEGIN: called CC=1 SCAR=0.0
3363 1 ▶use constant ScreenOrientationType => '@so';
Subroutine BEGIN: called CC=1 SCAR=0.0
3364 1 ▶use constant ScreenOrientationAngle => '@sr';
Subroutine BEGIN: called CC=1 SCAR=0.0
3365
3366 # Performance
3367 1 ▶use constant TimeOrigin => '@pt';
Subroutine BEGIN: called CC=1 SCAR=0.0
3368 1 ▶use constant PerformanceNow => '@pn';
Subroutine BEGIN: called CC=1 SCAR=0.0
3369
3370 # Event
3371 1 ▶use constant Event => '@EV';
Subroutine BEGIN: called CC=1 SCAR=0.0
3372 1 ▶use constant EventSerialize => '@Es';
Subroutine BEGIN: called CC=1 SCAR=0.0
3373 1 ▶use constant EventKey => '@ek';
Subroutine BEGIN: called CC=1 SCAR=0.0
3374 1 ▶use constant EventWhich => '@ew';
Subroutine BEGIN: called CC=1 SCAR=0.0
3375 1 ▶use constant EventClientX => '@ex';
Subroutine BEGIN: called CC=1 SCAR=0.0
3376 1 ▶use constant EventClientY => '@ey';
Subroutine BEGIN: called CC=1 SCAR=0.0
3377 1 ▶use constant EventPageX => '@eX';
Subroutine BEGIN: called CC=1 SCAR=0.0
3378 1 ▶use constant EventPageY => '@eY';
Subroutine BEGIN: called CC=1 SCAR=0.0
3379 1 ▶use constant EventOffsetX => '@Ex';
Subroutine BEGIN: called CC=1 SCAR=0.0
3380 1 ▶use constant EventOffsetY => '@Ey';
Subroutine BEGIN: called CC=1 SCAR=0.0
3381 1 ▶use constant EventDeltaY => '@ed';
Subroutine BEGIN: called CC=1 SCAR=0.0
3382
3383 package WasmLanguage;
3384 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3385 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3386 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
3387
3388 1 ▶use constant C => "c";
Subroutine BEGIN: called CC=1 SCAR=0.0
3389 1 ▶use constant CPP => "c";
Subroutine BEGIN: called CC=1 SCAR=0.0
3390 1 ▶use constant Rust => "rust";
Subroutine BEGIN: called CC=1 SCAR=0.0
3391 1 ▶use constant CSharp => "csharp";
Subroutine BEGIN: called CC=1 SCAR=0.0
3392 1 ▶use constant GO => "go";
Subroutine BEGIN: called CC=1 SCAR=0.0
3393 1 ▶use constant JAVA => "java";
Subroutine BEGIN: called CC=1 SCAR=0.0
3394 1 ▶use constant AssemblyScript => "as";
Subroutine BEGIN: called CC=1 SCAR=0.0
3395
3396 package HtmlEvent;
3397 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3398 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3399 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
3400
3401 1 ▶use constant OnAbort => "onabort";
Subroutine BEGIN: called CC=1 SCAR=0.0
3402 1 ▶use constant OnAfterPrint => "onafterprint";
Subroutine BEGIN: called CC=1 SCAR=0.0
3403 1 ▶use constant OnBeforePrint => "onbeforeprint";
Subroutine BEGIN: called CC=1 SCAR=0.0
3404 1 ▶use constant OnBeforeUnload => "onbeforeunload";
Subroutine BEGIN: called CC=1 SCAR=0.0
3405 1 ▶use constant OnBlur => "onblur";
Subroutine BEGIN: called CC=1 SCAR=0.0
3406 1 ▶use constant OnCanPlay => "oncanplay";
Subroutine BEGIN: called CC=1 SCAR=0.0
3407 1 ▶use constant OnCanPlayThrough => "oncanplaythrough";
Subroutine BEGIN: called CC=1 SCAR=0.0
3408 1 ▶use constant OnChange => "onchange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3409 1 ▶use constant OnClick => "onclick";
Subroutine BEGIN: called CC=1 SCAR=0.0
3410 1 ▶use constant OnCopy => "oncopy";
Subroutine BEGIN: called CC=1 SCAR=0.0
3411 1 ▶use constant OnCut => "oncut";
Subroutine BEGIN: called CC=1 SCAR=0.0
3412 1 ▶use constant OnDoubleClick => "ondblclick";
Subroutine BEGIN: called CC=1 SCAR=0.0
3413 1 ▶use constant OnDrag => "ondrag";
Subroutine BEGIN: called CC=1 SCAR=0.0
3414 1 ▶use constant OnDragEnd => "ondragend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3415 1 ▶use constant OnDragEnter => "ondragenter";
Subroutine BEGIN: called CC=1 SCAR=0.0
3416 1 ▶use constant OnDragLeave => "ondragleave";
Subroutine BEGIN: called CC=1 SCAR=0.0
3417 1 ▶use constant OnDragOver => "ondragover";
Subroutine BEGIN: called CC=1 SCAR=0.0
3418 1 ▶use constant OnDragStart => "ondragstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3419 1 ▶use constant OnDrop => "ondrop";
Subroutine BEGIN: called CC=1 SCAR=0.0
3420 1 ▶use constant OnDurationChange => "ondurationchange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3421 1 ▶use constant OnEnded => "onended";
Subroutine BEGIN: called CC=1 SCAR=0.0
3422 1 ▶use constant OnError => "onerror";
Subroutine BEGIN: called CC=1 SCAR=0.0
3423 1 ▶use constant OnFocus => "onfocus";
Subroutine BEGIN: called CC=1 SCAR=0.0
3424 1 ▶use constant OnFocusin => "onfocusin";
Subroutine BEGIN: called CC=1 SCAR=0.0
3425 1 ▶use constant OnFocusOut => "onfocusout";
Subroutine BEGIN: called CC=1 SCAR=0.0
3426 1 ▶use constant OnHashChange => "onhashchange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3427 1 ▶use constant OnInput => "oninput";
Subroutine BEGIN: called CC=1 SCAR=0.0
3428 1 ▶use constant OnInvalid => "oninvalid";
Subroutine BEGIN: called CC=1 SCAR=0.0
3429 1 ▶use constant OnKeyDown => "onkeydown";
Subroutine BEGIN: called CC=1 SCAR=0.0
3430 1 ▶use constant OnKeyPress => "onkeypress";
Subroutine BEGIN: called CC=1 SCAR=0.0
3431 1 ▶use constant OnKeyUp => "onkeyup";
Subroutine BEGIN: called CC=1 SCAR=0.0
3432 1 ▶use constant OnLoad => "onload";
Subroutine BEGIN: called CC=1 SCAR=0.0
3433 1 ▶use constant OnLoadedData => "onloadeddata";
Subroutine BEGIN: called CC=1 SCAR=0.0
3434 1 ▶use constant OnLoadedMetaData => "onloadedmetadata";
Subroutine BEGIN: called CC=1 SCAR=0.0
3435 1 ▶use constant OnLoadStart => "onloadstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3436 1 ▶use constant OnMouseDown => "onmousedown";
Subroutine BEGIN: called CC=1 SCAR=0.0
3437 1 ▶use constant OnMouseEnter => "onmouseenter";
Subroutine BEGIN: called CC=1 SCAR=0.0
3438 1 ▶use constant OnMouseLeave => "onmouseleave";
Subroutine BEGIN: called CC=1 SCAR=0.0
3439 1 ▶use constant OnMouseMove => "onmousemove";
Subroutine BEGIN: called CC=1 SCAR=0.0
3440 1 ▶use constant OnMouseOver => "onmouseover";
Subroutine BEGIN: called CC=1 SCAR=0.0
3441 1 ▶use constant OnMouseOut => "onmouseout";
Subroutine BEGIN: called CC=1 SCAR=0.0
3442 1 ▶use constant OnMouseUp => "onmouseup";
Subroutine BEGIN: called CC=1 SCAR=0.0
3443 1 ▶use constant OnOffline => "onoffline";
Subroutine BEGIN: called CC=1 SCAR=0.0
3444 1 ▶use constant OnOnline => "ononline";
Subroutine BEGIN: called CC=1 SCAR=0.0
3445 1 ▶use constant OnPageHide => "onpagehide";
Subroutine BEGIN: called CC=1 SCAR=0.0
3446 1 ▶use constant OnPageShow => "onpageshow";
Subroutine BEGIN: called CC=1 SCAR=0.0
3447 1 ▶use constant OnPaste => "onpaste";
Subroutine BEGIN: called CC=1 SCAR=0.0
3448 1 ▶use constant OnPause => "onpause";
Subroutine BEGIN: called CC=1 SCAR=0.0
3449 1 ▶use constant OnPlay => "onplay";
Subroutine BEGIN: called CC=1 SCAR=0.0
3450 1 ▶use constant OnPlaying => "onplaying";
Subroutine BEGIN: called CC=1 SCAR=0.0
3451 1 ▶use constant OnProgress => "onprogress";
Subroutine BEGIN: called CC=1 SCAR=0.0
3452 1 ▶use constant OnRateChange => "onratechange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3453 1 ▶use constant OnResize => "onresize";
Subroutine BEGIN: called CC=1 SCAR=0.0
3454 1 ▶use constant OnReset => "onreset";
Subroutine BEGIN: called CC=1 SCAR=0.0
3455 1 ▶use constant OnScroll => "onscroll";
Subroutine BEGIN: called CC=1 SCAR=0.0
3456 1 ▶use constant OnSearch => "onsearch";
Subroutine BEGIN: called CC=1 SCAR=0.0
3457 1 ▶use constant OnSeeked => "onseeked";
Subroutine BEGIN: called CC=1 SCAR=0.0
3458 1 ▶use constant OnSeeking => "onseeking";
Subroutine BEGIN: called CC=1 SCAR=0.0
3459 1 ▶use constant OnSelect => "onselect";
Subroutine BEGIN: called CC=1 SCAR=0.0
3460 1 ▶use constant OnStalled => "onstalled";
Subroutine BEGIN: called CC=1 SCAR=0.0
3461 1 ▶use constant OnSubmit => "onsubmit";
Subroutine BEGIN: called CC=1 SCAR=0.0
3462 1 ▶use constant OnSuspend => "onsuspend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3463 1 ▶use constant OnTimeUpdate => "ontimeupdate";
Subroutine BEGIN: called CC=1 SCAR=0.0
3464 1 ▶use constant OnToggle => "ontoggle";
Subroutine BEGIN: called CC=1 SCAR=0.0
3465 1 ▶use constant OnTouchCancel => "ontouchcancel";
Subroutine BEGIN: called CC=1 SCAR=0.0
3466 1 ▶use constant OnTouchend => "ontouchend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3467 1 ▶use constant OnTouchMove => "ontouchmove";
Subroutine BEGIN: called CC=1 SCAR=0.0
3468 1 ▶use constant OnTouchStart => "ontouchstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3469 1 ▶use constant OnUnload => "onunload";
Subroutine BEGIN: called CC=1 SCAR=0.0
3470 1 ▶use constant OnVolumeChange => "onvolumechange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3471 1 ▶use constant OnWaiting => "onwaiting";
Subroutine BEGIN: called CC=1 SCAR=0.0
3472 1 ▶use constant OnWheel => "onwheel";
Subroutine BEGIN: called CC=1 SCAR=0.0
3473
3474 package HtmlEventListener;
3475 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3476 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3477 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
3478
3479 1 ▶use constant Abort => "abort";
Subroutine BEGIN: called CC=1 SCAR=0.0
3480 1 ▶use constant AfterPrint => "afterprint";
Subroutine BEGIN: called CC=1 SCAR=0.0
3481 1 ▶use constant BeforePrint => "beforeprint";
Subroutine BEGIN: called CC=1 SCAR=0.0
3482 1 ▶use constant BeforeUnload => "beforeunload";
Subroutine BEGIN: called CC=1 SCAR=0.0
3483 1 ▶use constant Blur => "blur";
Subroutine BEGIN: called CC=1 SCAR=0.0
3484 1 ▶use constant CanPlay => "canplay";
Subroutine BEGIN: called CC=1 SCAR=0.0
3485 1 ▶use constant CanPlayThrough => "canplaythrough";
Subroutine BEGIN: called CC=1 SCAR=0.0
3486 1 ▶use constant Change => "change";
Subroutine BEGIN: called CC=1 SCAR=0.0
3487 1 ▶use constant Click => "click";
Subroutine BEGIN: called CC=1 SCAR=0.0
3488 1 ▶use constant Copy => "copy";
Subroutine BEGIN: called CC=1 SCAR=0.0
3489 1 ▶use constant Cut => "cut";
Subroutine BEGIN: called CC=1 SCAR=0.0
3490 1 ▶use constant DoubleClick => "dblclick";
Subroutine BEGIN: called CC=1 SCAR=0.0
3491 1 ▶use constant Drag => "drag";
Subroutine BEGIN: called CC=1 SCAR=0.0
3492 1 ▶use constant DragEnd => "dragend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3493 1 ▶use constant DragEnter => "dragenter";
Subroutine BEGIN: called CC=1 SCAR=0.0
3494 1 ▶use constant DragLeave => "dragleave";
Subroutine BEGIN: called CC=1 SCAR=0.0
3495 1 ▶use constant DragOver => "dragover";
Subroutine BEGIN: called CC=1 SCAR=0.0
3496 1 ▶use constant DragStart => "dragstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3497 1 ▶use constant Drop => "drop";
Subroutine BEGIN: called CC=1 SCAR=0.0
3498 1 ▶use constant DurationChange => "durationchange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3499 1 ▶use constant Ended => "ended";
Subroutine BEGIN: called CC=1 SCAR=0.0
3500 1 ▶use constant Error => "error";
Subroutine BEGIN: called CC=1 SCAR=0.0
3501 1 ▶use constant Focus => "focus";
Subroutine BEGIN: called CC=1 SCAR=0.0
3502 1 ▶use constant Focusin => "focusin";
Subroutine BEGIN: called CC=1 SCAR=0.0
3503 1 ▶use constant FocusOut => "focusout";
Subroutine BEGIN: called CC=1 SCAR=0.0
3504 1 ▶use constant HashChange => "hashchange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3505 1 ▶use constant Input => "input";
Subroutine BEGIN: called CC=1 SCAR=0.0
3506 1 ▶use constant Invalid => "invalid";
Subroutine BEGIN: called CC=1 SCAR=0.0
3507 1 ▶use constant KeyDown => "keydown";
Subroutine BEGIN: called CC=1 SCAR=0.0
3508 1 ▶use constant KeyPress => "keypress";
Subroutine BEGIN: called CC=1 SCAR=0.0
3509 1 ▶use constant KeyUp => "keyup";
Subroutine BEGIN: called CC=1 SCAR=0.0
3510 1 ▶use constant Load => "load";
Subroutine BEGIN: called CC=1 SCAR=0.0
3511 1 ▶use constant LoadedData => "loadeddata";
Subroutine BEGIN: called CC=1 SCAR=0.0
3512 1 ▶use constant LoadedMetaData => "loadedmetadata";
Subroutine BEGIN: called CC=1 SCAR=0.0
3513 1 ▶use constant LoadStart => "loadstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3514 1 ▶use constant MouseDown => "mousedown";
Subroutine BEGIN: called CC=1 SCAR=0.0
3515 1 ▶use constant MouseEnter => "mouseenter";
Subroutine BEGIN: called CC=1 SCAR=0.0
3516 1 ▶use constant MouseLeave => "mouseleave";
Subroutine BEGIN: called CC=1 SCAR=0.0
3517 1 ▶use constant MouseMove => "mousemove";
Subroutine BEGIN: called CC=1 SCAR=0.0
3518 1 ▶use constant MouseOver => "mouseover";
Subroutine BEGIN: called CC=1 SCAR=0.0
3519 1 ▶use constant MouseOut => "mouseout";
Subroutine BEGIN: called CC=1 SCAR=0.0
3520 1 ▶use constant MouseUp => "mouseup";
Subroutine BEGIN: called CC=1 SCAR=0.0
3521 1 ▶use constant Offline => "offline";
Subroutine BEGIN: called CC=1 SCAR=0.0
3522 1 ▶use constant Online => "online";
Subroutine BEGIN: called CC=1 SCAR=0.0
3523 1 ▶use constant PageHide => "pagehide";
Subroutine BEGIN: called CC=1 SCAR=0.0
3524 1 ▶use constant PageShow => "pageshow";
Subroutine BEGIN: called CC=1 SCAR=0.0
3525 1 ▶use constant Paste => "paste";
Subroutine BEGIN: called CC=1 SCAR=0.0
3526 1 ▶use constant Pause => "pause";
Subroutine BEGIN: called CC=1 SCAR=0.0
3527 1 ▶use constant Play => "play";
Subroutine BEGIN: called CC=1 SCAR=0.0
3528 1 ▶use constant Playing => "playing";
Subroutine BEGIN: called CC=1 SCAR=0.0
3529 1 ▶use constant Progress => "progress";
Subroutine BEGIN: called CC=1 SCAR=0.0
3530 1 ▶use constant RateChange => "ratechange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3531 1 ▶use constant Resize => "resize";
Subroutine BEGIN: called CC=1 SCAR=0.0
3532 1 ▶use constant Reset => "reset";
Subroutine BEGIN: called CC=1 SCAR=0.0
3533 1 ▶use constant Scroll => "scroll";
Subroutine BEGIN: called CC=1 SCAR=0.0
3534 1 ▶use constant Search => "search";
Subroutine BEGIN: called CC=1 SCAR=0.0
3535 1 ▶use constant Seeked => "seeked";
Subroutine BEGIN: called CC=1 SCAR=0.0
3536 1 ▶use constant Seeking => "seeking";
Subroutine BEGIN: called CC=1 SCAR=0.0
3537 1 ▶use constant Select => "select";
Subroutine BEGIN: called CC=1 SCAR=0.0
3538 1 ▶use constant Stalled => "stalled";
Subroutine BEGIN: called CC=1 SCAR=0.0
3539 1 ▶use constant Submit => "submit";
Subroutine BEGIN: called CC=1 SCAR=0.0
3540 1 ▶use constant Suspend => "suspend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3541 1 ▶use constant TimeUpdate => "timeupdate";
Subroutine BEGIN: called CC=1 SCAR=0.0
3542 1 ▶use constant Toggle => "toggle";
Subroutine BEGIN: called CC=1 SCAR=0.0
3543 1 ▶use constant TouchCancel => "touchcancel";
Subroutine BEGIN: called CC=1 SCAR=0.0
3544 1 ▶use constant Touchend => "touchend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3545 1 ▶use constant TouchMove => "touchmove";
Subroutine BEGIN: called CC=1 SCAR=0.0
3546 1 ▶use constant TouchStart => "touchstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3547 1 ▶use constant Unload => "unload";
Subroutine BEGIN: called CC=1 SCAR=0.0
3548 1 ▶use constant VolumeChange => "volumechange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3549 1 ▶use constant Waiting => "waiting";
Subroutine BEGIN: called CC=1 SCAR=0.0
3550 1 ▶use constant Wheel => "wheel";
Subroutine BEGIN: called CC=1 SCAR=0.0
3551
3552 1 ▶use constant AnimationEnd => "animationend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3553 1 ▶use constant AnimationIteration => "animationiteration";
Subroutine BEGIN: called CC=1 SCAR=0.0
3554 1 ▶use constant AnimationStart => "animationstart";
Subroutine BEGIN: called CC=1 SCAR=0.0
3555 1 ▶use constant ContextMenu => "contextmenu";
Subroutine BEGIN: called CC=1 SCAR=0.0
3556 1 ▶use constant FullScreenChange => "fullscreenchange";
Subroutine BEGIN: called CC=1 SCAR=0.0
3557 1 ▶use constant FullScreenError => "fullscreenerror";
Subroutine BEGIN: called CC=1 SCAR=0.0
3558 1 ▶use constant PopState => "popstate";
Subroutine BEGIN: called CC=1 SCAR=0.0
3559 1 ▶use constant TransitionEnd => "transitionend";
Subroutine BEGIN: called CC=1 SCAR=0.0
3560 1 ▶use constant Storage => "storage";
Subroutine BEGIN: called CC=1 SCAR=0.0
3561
3562 # Custom
3563 1 ▶use constant ScrollBottom => "scrollbottom"; # Need Call EnableScrollBottomEvent Method Before
Subroutine BEGIN: called CC=1 SCAR=0.0
3564 1 ▶use constant ElementReached => "elementreached"; # Need Call EnableReachedElementEvent Method Before
Subroutine BEGIN: called CC=1 SCAR=0.0
3565
3566 package Extension;
3567 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3568 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3569 1 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
3570
3571 # Simulates C# Extension Methods for strings in a natural Perl way.
3572 0 ▶sub child {
Subroutine child: not called CC=2 SCAR=17.9
3573 0 my ($text, $value) = @_;
3574 0 ▶ return $value if length($text) < 1;
Branch: 1 branch
BranchTrueFalseTotal
if length $text < 1 0 0 0
3575 0 return $text . "|" . $value;
3576 }
3577
3578 0 ▶sub parent {
Subroutine parent: not called CC=4 SCAR=30.0
3579 0 my ($text) = @_;
3580 0 ▶ return $text if length($text) < 1;
Branch: 1 branch
BranchTrueFalseTotal
if length $text < 1 0 0 0
3581 0 ▶ if ($text =~ /\|\/$/ || $text =~ /\/\//) {
Branch: 1 branch
BranchTrueFalseTotal
if ($text =~ m[\|/$]u or $text =~ m[//]u) 0 0 0
Condition0%0/3
$text =~ m[\|/$]u or $text =~ m[//]u
l!l&&r!l&&!r
000
MC/DC0%0/2
$text =~ m[\|/$]u or $text =~ m[//]u
$text =~ m[\|/$]u $text =~ m[//]u
Truth table0%0/3
A or B
A= $text =~ m[\|/$]uB= $text =~ m[//]u
ABresult
1X1
011
000
3582 0 return $text . '/';
3583 }
3584 0 return $text . "|/";
3585 }
3586
3587 0 ▶sub criteria {
Subroutine criteria: not called CC=2 SCAR=17.9
3588 0 my ($text, $value) = @_;
3589 0 ▶ return $value if length($text) < 1;
Branch: 1 branch
BranchTrueFalseTotal
if length $text < 1 0 0 0
3590 0 my $res = $value;
3591 0 $res =~ s/\|/\$[vb];/g;
3592 0 $res =~ s/\?/\$[qu];/g;
3593 0 $res =~ s/\=/\$[eq];/g;
3594 0 return $text . "?" . $res;
3595 }
3596
3597 0 ▶sub append_fetch_replace {
Subroutine append_fetch_replace: not called CC=1 SCAR=6.9
3598 0 my ($text, $search_value, $value) = @_;
3599 0 my $fs = chr(28);
3600 0 my $clean_text = substr($text, 1);
3601 0 return '@;' . $search_value . $fs . $value . $fs . $clean_text;
3602 }
3603
3604 0 ▶sub line_break {
Subroutine line_break: not called CC=3 SCAR=24.8
3605 0 my ($text, $encode_line) = @_;
3606 0 ▶ $encode_line = 0 if !defined $encode_line;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $encode_line 0 0 0
3607 0 ▶ my $encode = $encode_line ? "\$[sln];" : "";
Branch: 1 branch
BranchTrueFalseTotal
$encode_line ? : 0 0 0
3608 0 my $res = $text;
3609 0 $res =~ s/\r\n/$encode/g;
3610 0 $res =~ s/\n/$encode/g;
3611 0 $res =~ s/\r/$encode/g;
3612 0 return $res;
3613 }
3614
3615 # Converts Numbers to Strings
3616 0 ▶sub to_js_string {
Subroutine to_js_string: not called CC=1 SCAR=6.9
3617 0 my ($text) = @_;
3618 0 return "\"" . $text . "\"";
3619 }
3620
3621 # Get JS Object Momentary
3622 0 ▶sub to_js_object {
Subroutine to_js_object: not called CC=1 SCAR=6.9
3623 0 my ($text) = @_;
3624 0 return "\$" . $text;
3625 }
3626
3627 # Get JS Object Returned Value Once
3628 0 ▶sub to_js_return_object {
Subroutine to_js_return_object: not called CC=1 SCAR=6.9
3629 0 my ($text) = @_;
3630 0 return "\$@" . $text;
3631 }
3632
3633 1 1;
↑ Summary