wr_root/application/lib/wr_model1/models/MasterModel/WarpedValues.pl

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 26 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« wr_root/application/lib/wr_model1/models/MasterModel/WarpedId.pl ↑ Summary wr_root/application/lib/wr_model1/models/MasterModel/X_base_class.pl »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 use v5.20;
4 use utf8;
5  
6 return [
7 {
8 'element' => [
9 {
10 5 ▶ 'cargo' => {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
11 5 ▶ 'config_class_name' => 'MasterModel::RSlave',
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
12 'type' => 'node'
13 },
14 'index_type' => 'string',
15 3 'name' => 'recursive_slave',
16 'type' => 'hash'
17 },
18 {
19 'cargo' => {
20 'compute' => {
21 'formula' => 'macro is $m, my idx: &index, my element &element, upper element &element($up), up idx &index($up)',
22 'variables' => {
23 'm' => '! macro',
24 'up' => '-'
25 }
26 },
27 'type' => 'leaf',
28 'value_type' => 'string'
29 },
30 'index_type' => 'string',
31 'name' => 'big_compute',
32 'type' => 'hash'
33 },
34 {
35 'compute' => {
36 'formula' => 'trad idx $replace{&index($up)}',
37 'replace' => {
38 'l1' => 'level1',
39 'l2' => 'level2'
40 },
41 'variables' => {
42 'up' => '-'
43 }
44 },
45 'name' => 'big_replace',
46 'type' => 'leaf',
47 'value_type' => 'string'
48 },
49 {
50 'cargo' => {
51 'compute' => {
52 'formula' => 'trad macro is $replace{$m}',
53 'replace' => {
54 'A' => 'macroA',
55 'B' => 'macroB',
56 'C' => 'macroC'
57 },
58 'variables' => {
59 'm' => '! macro'
60 }
61 },
62 'type' => 'leaf',
63 'value_type' => 'string'
64 },
65 'index_type' => 'string',
66 'name' => 'macro_replace',
67 'type' => 'hash'
68 }
69 ],
70 'name' => 'MasterModel::RSlave'
71 },
72 {
73 'element' => [
74 {
75 'choice' => [
76 'Av',
77 'Bv',
78 'Cv'
79 ],
80 'name' => 'X',
81 'type' => 'leaf',
82 'value_type' => 'enum'
83 },
84 {
85 'alias' => 'X',
86 'name' => 'Y'
87 },
88 {
89 'alias' => 'X',
90 'name' => 'Z'
91 },
92 {
93 'cargo' => {
94 'config_class_name' => 'MasterModel::RSlave',
95 'type' => 'node'
96 },
97 'index_type' => 'string',
98 'name' => 'recursive_slave',
99 'type' => 'hash'
100 },
101 {
102 'name' => 'W',
103 'type' => 'leaf',
104 'value_type' => 'enum'
105 },
106 {
107 'compute' => {
108 'formula' => 'macro is $m',
109 'variables' => {
110 'm' => '- - macro'
111 }
112 },
113 'name' => 'Comp',
114 'type' => 'leaf',
115 'value_type' => 'string'
116 }
117 ],
118 'level' => {
119 'hidden' => 'W'
120 },
121 'name' => 'MasterModel::Slave',
122 'warp' => {
123 'W' => {
124 'follow' => {
125 'f1' => '- - macro'
126 },
127 'rules' => [
128 {
129 'apply' => {
130 'choice' => [
131 'Av',
132 'Bv',
133 'Cv'
134 ],
135 'default' => 'Bv',
136 'level' => 'normal'
137 },
138 'when' => '$f1 eq \'B\''
139 },
140 {
141 'apply' => {
142 'choice' => [
143 'Av',
144 'Bv',
145 'Cv'
146 ],
147 'default' => 'Av',
148 'level' => 'normal'
149 },
150 'when' => '$f1 eq \'A\''
151 }
152 ]
153 },
154 'X' => {
155 'follow' => {
156 'f1' => '- - macro'
157 },
158 'rules' => [
159 {
160 'apply' => {
161 'default' => 'Av'
162 },
163 'when' => '$f1 eq \'A\''
164 },
165 {
166 'apply' => {
167 'default' => 'Bv'
168 },
169 'when' => '$f1 eq \'B\''
170 }
171 ]
172 },
173 'Y' => '*X',
174 'Z' => '*X'
175 }
176 },
177 {
178 'element' => [
179 {
180 'choice' => [
181 'm_value_element',
182 'compute_element'
183 ],
184 'name' => 'get_element',
185 'type' => 'leaf',
186 'value_type' => 'enum'
187 },
188 {
189 'choice' => [
190 'get_element'
191 ],
192 'name' => 'where_is_element',
193 'type' => 'leaf',
194 'value_type' => 'enum'
195 },
196 {
197 'choice' => [
198 'A',
199 'B',
200 'C',
201 'D'
202 ],
203 'name' => 'macro',
204 'type' => 'leaf',
205 'value_type' => 'enum'
206 },
207 {
208 'name' => 'macro2',
209 'type' => 'leaf',
210 'value_type' => 'enum'
211 },
212 {
213 'alias' => 'macro2',
214 'name' => 'm_value'
215 },
216 {
217 'alias' => 'macro2',
218 'name' => 'm_value_old'
219 },
220 {
221 'compute' => {
222 'formula' => 'macro is $m, my element is &element',
223 'variables' => {
224 'm' => '- macro'
225 }
226 },
227 'name' => 'compute',
228 'type' => 'leaf',
229 'value_type' => 'string'
230 },
231 {
232 'compute' => {
233 'formula' => 'get_element is $replace{$s}, indirect value is \'$v\'',
234 'replace' => {
235 'compute_element' => 'compute',
236 'm_value_element' => 'm_value'
237 },
238 'variables' => {
239 's' => '- $where',
240 'v' => '- $replace{$s}',
241 'where' => '- where_is_element'
242 }
243 },
244 'mandatory' => 1,
245 'name' => 'var_path',
246 'type' => 'leaf',
247 'value_type' => 'string'
248 },
249 {
250 'cargo' => {
251 'type' => 'leaf',
252 'value_type' => 'string'
253 },
254 'index_type' => 'string',
255 'name' => 'class',
256 'type' => 'hash'
257 },
258 {
259 'name' => 'warped_out_ref',
260 'refer_to' => '- class',
261 'type' => 'leaf',
262 'value_type' => 'reference'
263 },
264 {
265 'config_class_name' => 'MasterModel::Slave',
266 'name' => 'bar',
267 'type' => 'node'
268 },
269 {
270 'alias' => 'bar',
271 'name' => 'foo'
272 },
273 {
274 'alias' => 'bar',
275 'name' => 'foo2'
276 }
277 ],
278 'level' => {
279 'hidden' => [
280 'macro2',
281 'warped_out_ref'
282 ]
283 },
284 'name' => 'MasterModel::WarpedValues',
285 'warp' => {
286 'm_value' => {
287 'follow' => {
288 'm' => '- macro'
289 },
290 'rules' => [
291 {
292 'apply' => {
293 'choice' => [
294 'Av',
295 'Bv'
296 ],
297 'help' => {
298 'Av' => 'Av help'
299 }
300 },
301 'when' => '$m eq "A" or $m eq "D"'
302 },
303 {
304 'apply' => {
305 'choice' => [
306 'Bv',
307 'Cv'
308 ],
309 'help' => {
310 'Bv' => 'Bv help'
311 }
312 },
313 'when' => '$m eq "B"'
314 },
315 {
316 'apply' => {
317 'choice' => [
318 'Cv'
319 ],
320 'help' => {
321 'Cv' => 'Cv help'
322 }
323 },
324 'when' => '$m eq "C"'
325 }
326 ]
327 },
328 'm_value_old' => {
329 'follow' => {
330 'f1' => '- macro'
331 },
332 'rules' => [
333 {
334 'apply' => {
335 'choice' => [
336 'Av',
337 'Bv'
338 ],
339 'help' => {
340 'Av' => 'Av help'
341 }
342 },
343 'when' => '$f1 eq \'A\' or $f1 eq \'D\''
344 },
345 {
346 'apply' => {
347 'choice' => [
348 'Bv',
349 'Cv'
350 ],
351 'help' => {
352 'Bv' => 'Bv help'
353 }
354 },
355 'when' => '$f1 eq \'B\''
356 },
357 {
358 'apply' => {
359 'choice' => [
360 'Cv'
361 ],
362 'help' => {
363 'Cv' => 'Cv help'
364 }
365 },
366 'when' => '$f1 eq \'C\''
367 }
368 ]
369 },
370 'macro2' => {
371 'follow' => {
372 'f1' => '- macro'
373 },
374 'rules' => [
375 {
376 'apply' => {
377 'choice' => [
378 'A',
379 'B',
380 'C',
381 'D'
382 ],
383 'level' => 'normal'
384 },
385 'when' => '$f1 eq \'B\''
386 }
387 ]
388 },
389 'warped_out_ref' => {
390 'follow' => {
391 'm' => '- macro',
392 'm2' => '- macro2'
393 },
394 'rules' => [
395 {
396 'apply' => {
397 'level' => 'normal'
398 },
399 'when' => '$m eq "A" or $m2 eq "A"'
400 }
401 ]
402 }
403 }
404 }
405 ]
406 ;
« wr_root/application/lib/wr_model1/models/MasterModel/WarpedId.pl ↑ Summary wr_root/application/lib/wr_model1/models/MasterModel/X_base_class.pl »