File Coverage

tmp/TestPkg.pm
Criterion Covered Total %
statement 162 624 25.9
branch 68 330 20.6
condition 12 27 44.4
subroutine 21 110 19.0
pod 104 104 100.0
total 367 1195 30.7


line stmt bran cond sub pod time code
1             package tmp::TestPkg;
2              
3 1     1   25051 use 5.020000;
  1         4  
  1         40  
4 1     1   5 use strict;
  1         46  
  1         100  
5 1     1   6 use warnings;
  1         3  
  1         38  
6 1     1   5 use Error qw(:try);
  1         2  
  1         6  
7              
8             # Used by _value_is_allowed
9             our %ALLOW_ISA = (
10             'm10' => [ 'isaBar', 'isaFoo' ],
11             'm3' => [ 'isaBar', 'isaFoo' ],
12             'm4' => [ 'isaBar', 'isaFoo' ],
13             'm5' => [ 'isaBar', 'isaFoo' ],
14             'm6' => [ 'isaBar', 'isaFoo' ],
15             'm7' => [ 'isaBar', 'isaFoo' ],
16             'm8' => [ 'isaBar', 'isaFoo' ],
17             'm9' => [ 'isaBar', 'isaFoo' ],
18             's3' => [ 'isaBar', 'isaFoo' ],
19             's4' => [ 'isaBar', 'isaFoo' ],
20             's5' => [ 'isaBar', 'isaFoo' ],
21             's6' => [ 'isaBar', 'isaFoo' ],
22             );
23              
24             # Used by _value_is_allowed
25             our %ALLOW_REF = (
26             'm10' => {
27             'refBar' => 1,
28             'refFoo' => 1,
29             },
30             'm4' => {
31             'refBar' => 1,
32             'refFoo' => 1,
33             },
34             'm5' => {
35             'refBar' => 1,
36             'refFoo' => 1,
37             },
38             'm6' => {
39             'refBar' => 1,
40             'refFoo' => 1,
41             },
42             'm7' => {
43             'refBar' => 1,
44             'refFoo' => 1,
45             },
46             'm8' => {
47             'refBar' => 1,
48             'refFoo' => 1,
49             },
50             'm9' => {
51             'refBar' => 1,
52             'refFoo' => 1,
53             },
54             's4' => {
55             'refBar' => 1,
56             'refFoo' => 1,
57             },
58             's5' => {
59             'refBar' => 1,
60             'refFoo' => 1,
61             },
62             's6' => {
63             'refBar' => 1,
64             'refFoo' => 1,
65             },
66             );
67              
68             # Used by _value_is_allowed
69             our %ALLOW_RX = (
70             'm10' => [ '^\S+$', '^\d+$' ],
71             );
72              
73             # Used by _value_is_allowed
74             our %ALLOW_VALUE = (
75             'm10' => {
76             'valueBar' => 1,
77             'valueFoo' => 1,
78             },
79             'm5' => {
80             'valueBar' => 1,
81             'valueFoo' => 1,
82             },
83             'm6' => {
84             'valueBar' => 1,
85             'valueFoo' => 1,
86             },
87             'm7' => {
88             'valueBar' => 1,
89             'valueFoo' => 1,
90             },
91             'm8' => {
92             'valueBar' => 1,
93             'valueFoo' => 1,
94             },
95             'm9' => {
96             'valueBar' => 1,
97             'valueFoo' => 1,
98             },
99             's5' => {
100             'valueBar' => 1,
101             'valueFoo' => 1,
102             },
103             's6' => {
104             'valueBar' => 1,
105             'valueFoo' => 1,
106             },
107             );
108              
109             # Used by _initialize
110             our %DEFAULT_VALUE = (
111             'b2' => 1,
112             'b4' => 1,
113             );
114              
115             # Package version
116             our ($VERSION) = '$Revision: 0.0.0.0 $' =~ /\$Revision:\s+([^\s]+)/;
117              
118             =head1 NAME
119              
120             tmp::TestPkg - NO DESCRIPTION AVAILABLE
121              
122             =head1 SYNOPSIS
123              
124             TODO
125              
126             =head1 ABSTRACT
127              
128             TODO
129              
130             =head1 DESCRIPTION
131              
132             C TODO
133              
134             =head1 CONSTRUCTOR
135              
136             =over
137              
138             =item new(OPT_HASH_REF)
139              
140             Creates a new C object. C is a hash reference used to pass initialization options. C is mandatory. On error an exception C is thrown.
141              
142             Options for C may include:
143              
144             =over
145              
146             =item B>
147              
148             Passed to L.
149              
150             =item B>
151              
152             Passed to L. Defaults to B<1>.
153              
154             =item B>
155              
156             Passed to L. Mandatory option.
157              
158             =item B>
159              
160             Passed to L. Mandatory option. Defaults to B<1>.
161              
162             =item B>
163              
164             Passed to L. Must be an C reference.
165              
166             =item B>
167              
168             Passed to L. Must be an C reference. Mandatory option.
169              
170             =item B>
171              
172             Passed to L. Must be an C reference.
173              
174             =item B>
175              
176             Passed to L. Must be an C reference.
177              
178             =item B>
179              
180             Passed to L. Must be an C reference.
181              
182             =item B>
183              
184             Passed to L. Must be an C reference.
185              
186             =item B>
187              
188             Passed to L. Must be an C reference. Mandatory option.
189              
190             =item B>
191              
192             Passed to L. Must be an C reference. Mandatory option.
193              
194             =item B>
195              
196             Passed to L. Must be an C reference. Mandatory option.
197              
198             =item B>
199              
200             Passed to L. Must be an C reference. Mandatory option.
201              
202             =item B>
203              
204             Passed to L.
205              
206             =item B>
207              
208             Passed to L.
209              
210             =item B>
211              
212             Passed to L.
213              
214             =item B>
215              
216             Passed to L.
217              
218             =item B>
219              
220             Passed to L.
221              
222             =item B>
223              
224             Passed to L. Mandatory option.
225              
226             =back
227              
228             =item new_by_foo(FOO)
229              
230             Constructs a new object using foo. C must be a C reference. On error an exception C is thrown.
231              
232             =back
233              
234             =head1 METHODS
235              
236             =over
237              
238             =item add_m10( [ KEY, VALUE ... ] )
239              
240             Add additional keys/values on not described option. C are key/value pairs. The addition may not yield to multiple identical keys in the list. Hence, multiple occurrences of the same key cause the last occurrence to be inserted. On error an exception C is thrown.
241              
242             =over
243              
244             =item The values in C must be a (sub)class of:
245              
246             =over
247              
248             =item isaBar
249              
250             =item isaFoo
251              
252             =back
253              
254             =item Or, the values in C must be a reference of:
255              
256             =over
257              
258             =item refBar
259              
260             =item refFoo
261              
262             =back
263              
264             =item Or, the values in C must match regular expression:
265              
266             =over
267              
268             =item ^\S+$
269              
270             =item ^\d+$
271              
272             =back
273              
274             =item Or, the values in C must be a one of:
275              
276             =over
277              
278             =item valueBar
279              
280             =item valueFoo
281              
282             =back
283              
284             =back
285              
286             =item add_m8(ARRAY)
287              
288             Add additional values on not described option. C is the list value. The addition may not yield to multiple identical elements in the list. Hence, multiple occurrences of the same element cause the last occurrence to be inserted. On error an exception C is thrown.
289              
290             =over
291              
292             =item The values in C must be a (sub)class of:
293              
294             =over
295              
296             =item isaBar
297              
298             =item isaFoo
299              
300             =back
301              
302             =item Or, the values in C must be a reference of:
303              
304             =over
305              
306             =item refBar
307              
308             =item refFoo
309              
310             =back
311              
312             =item Or, the values in C must be a one of:
313              
314             =over
315              
316             =item valueBar
317              
318             =item valueFoo
319              
320             =back
321              
322             =back
323              
324             =item delete_m10(ARRAY)
325              
326             Delete elements from not described option. After deleting at least one element must remain. Returns the number of deleted elements. On error an exception C is thrown.
327              
328             =item delete_m8(ARRAY)
329              
330             Delete elements from not described option. After deleting at least one element must remain. Returns the number of deleted elements. On error an exception C is thrown.
331              
332             =item do_foo(BAR)
333              
334             Does foo. C must be a C reference. On error an exception C is thrown.
335              
336             =item exists_m1(ARRAY)
337              
338             Returns the count of items in C that are in not described option.
339              
340             =item exists_m10(ARRAY)
341              
342             Returns the count of items in C that are in not described option.
343              
344             =item exists_m2(ARRAY)
345              
346             Returns the count of items in C that are in not described option.
347              
348             =item exists_m3(ARRAY)
349              
350             Returns the count of items in C that are in not described option.
351              
352             =item exists_m4(ARRAY)
353              
354             Returns the count of items in C that are in not described option.
355              
356             =item exists_m5(ARRAY)
357              
358             Returns the count of items in C that are in not described option.
359              
360             =item exists_m6(ARRAY)
361              
362             Returns the count of items in C that are in not described option.
363              
364             =item exists_m7(ARRAY)
365              
366             Returns the count of items in C that are in not described option.
367              
368             =item exists_m8(ARRAY)
369              
370             Returns the count of items in C that are in not described option.
371              
372             =item exists_m9(ARRAY)
373              
374             Returns the count of items in C that are in not described option.
375              
376             =item get_m1( [ INDEX_ARRAY ] )
377              
378             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
379              
380             =item get_m2( [ INDEX_ARRAY ] )
381              
382             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
383              
384             =item get_m3( [ INDEX_ARRAY ] )
385              
386             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
387              
388             =item get_m4( [ INDEX_ARRAY ] )
389              
390             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
391              
392             =item get_m5( [ INDEX_ARRAY ] )
393              
394             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
395              
396             =item get_m6( [ INDEX_ARRAY ] )
397              
398             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
399              
400             =item get_m7( [ INDEX_ARRAY ] )
401              
402             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
403              
404             =item get_m9( [ INDEX_ARRAY ] )
405              
406             Returns an C containing not described option. C is an optional list of indexes which when specified causes only the indexed elements in the ordered list to be returned. If not specified, all elements are returned.
407              
408             =item get_s1()
409              
410             Returns not described option.
411              
412             =item get_s2()
413              
414             Returns not described option.
415              
416             =item get_s3()
417              
418             Returns not described option.
419              
420             =item get_s4()
421              
422             Returns not described option.
423              
424             =item get_s5()
425              
426             Returns not described option.
427              
428             =item get_s6()
429              
430             Returns not described option.
431              
432             =item is_b1()
433              
434             Returns whether not described option or not.
435              
436             =item is_b2()
437              
438             Returns whether not described option or not.
439              
440             =item is_b3()
441              
442             Returns whether not described option or not.
443              
444             =item is_b4()
445              
446             Returns whether not described option or not.
447              
448             =item keys_m10()
449              
450             Returns an C containing the keys of not described option.
451              
452             =item pop_m1()
453              
454             Pop and return an element off not described option. On error an exception C is thrown.
455              
456             =item pop_m2()
457              
458             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
459              
460             =item pop_m3()
461              
462             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
463              
464             =item pop_m4()
465              
466             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
467              
468             =item pop_m5()
469              
470             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
471              
472             =item pop_m6()
473              
474             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
475              
476             =item pop_m7()
477              
478             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
479              
480             =item pop_m9()
481              
482             Pop and return an element off not described option. After popping at least one element must remain. On error an exception C is thrown.
483              
484             =item push_m1(ARRAY)
485              
486             Push additional values on not described option. C is the list value. On error an exception C is thrown.
487              
488             =item push_m2(ARRAY)
489              
490             Push additional values on not described option. C is the list value. On error an exception C is thrown.
491              
492             =item push_m3(ARRAY)
493              
494             Push additional values on not described option. C is the list value. On error an exception C is thrown.
495              
496             =over
497              
498             =item The values in C must be a (sub)class of:
499              
500             =over
501              
502             =item isaBar
503              
504             =item isaFoo
505              
506             =back
507              
508             =back
509              
510             =item push_m4(ARRAY)
511              
512             Push additional values on not described option. C is the list value. On error an exception C is thrown.
513              
514             =over
515              
516             =item The values in C must be a (sub)class of:
517              
518             =over
519              
520             =item isaBar
521              
522             =item isaFoo
523              
524             =back
525              
526             =item Or, the values in C must be a reference of:
527              
528             =over
529              
530             =item refBar
531              
532             =item refFoo
533              
534             =back
535              
536             =back
537              
538             =item push_m5(ARRAY)
539              
540             Push additional values on not described option. C is the list value. On error an exception C is thrown.
541              
542             =over
543              
544             =item The values in C must be a (sub)class of:
545              
546             =over
547              
548             =item isaBar
549              
550             =item isaFoo
551              
552             =back
553              
554             =item Or, the values in C must be a reference of:
555              
556             =over
557              
558             =item refBar
559              
560             =item refFoo
561              
562             =back
563              
564             =item Or, the values in C must be a one of:
565              
566             =over
567              
568             =item valueBar
569              
570             =item valueFoo
571              
572             =back
573              
574             =back
575              
576             =item push_m6(ARRAY)
577              
578             Push additional values on not described option. C is the list value. On error an exception C is thrown.
579              
580             =over
581              
582             =item The values in C must be a (sub)class of:
583              
584             =over
585              
586             =item isaBar
587              
588             =item isaFoo
589              
590             =back
591              
592             =item Or, the values in C must be a reference of:
593              
594             =over
595              
596             =item refBar
597              
598             =item refFoo
599              
600             =back
601              
602             =item Or, the values in C must be a one of:
603              
604             =over
605              
606             =item valueBar
607              
608             =item valueFoo
609              
610             =back
611              
612             =back
613              
614             =item push_m7(ARRAY)
615              
616             Push additional values on not described option. C is the list value. On error an exception C is thrown.
617              
618             =over
619              
620             =item The values in C must be a (sub)class of:
621              
622             =over
623              
624             =item isaBar
625              
626             =item isaFoo
627              
628             =back
629              
630             =item Or, the values in C must be a reference of:
631              
632             =over
633              
634             =item refBar
635              
636             =item refFoo
637              
638             =back
639              
640             =item Or, the values in C must be a one of:
641              
642             =over
643              
644             =item valueBar
645              
646             =item valueFoo
647              
648             =back
649              
650             =back
651              
652             =item push_m9(ARRAY)
653              
654             Push additional values on not described option. C is the list value. The push may not yield to multiple identical elements in the list. Hence, multiple occurrences of the same element are ignored. On error an exception C is thrown.
655              
656             =over
657              
658             =item The values in C must be a (sub)class of:
659              
660             =over
661              
662             =item isaBar
663              
664             =item isaFoo
665              
666             =back
667              
668             =item Or, the values in C must be a reference of:
669              
670             =over
671              
672             =item refBar
673              
674             =item refFoo
675              
676             =back
677              
678             =item Or, the values in C must be a one of:
679              
680             =over
681              
682             =item valueBar
683              
684             =item valueFoo
685              
686             =back
687              
688             =back
689              
690             =item set_b1(VALUE)
691              
692             State that not described option. C is the value. On error an exception C is thrown.
693              
694             =item set_b2(VALUE)
695              
696             State that not described option. C is the value. Default value at initialization is C<1>. On error an exception C is thrown.
697              
698             =item set_b3(VALUE)
699              
700             State that not described option. C is the value. On error an exception C is thrown.
701              
702             =item set_b4(VALUE)
703              
704             State that not described option. C is the value. Default value at initialization is C<1>. On error an exception C is thrown.
705              
706             =item set_idx_m1( INDEX, VALUE )
707              
708             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
709              
710             =item set_idx_m2( INDEX, VALUE )
711              
712             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
713              
714             =item set_idx_m3( INDEX, VALUE )
715              
716             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
717              
718             =over
719              
720             =item The values in C must be a (sub)class of:
721              
722             =over
723              
724             =item isaBar
725              
726             =item isaFoo
727              
728             =back
729              
730             =back
731              
732             =item set_idx_m4( INDEX, VALUE )
733              
734             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
735              
736             =over
737              
738             =item The values in C must be a (sub)class of:
739              
740             =over
741              
742             =item isaBar
743              
744             =item isaFoo
745              
746             =back
747              
748             =item Or, the values in C must be a reference of:
749              
750             =over
751              
752             =item refBar
753              
754             =item refFoo
755              
756             =back
757              
758             =back
759              
760             =item set_idx_m5( INDEX, VALUE )
761              
762             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
763              
764             =over
765              
766             =item The values in C must be a (sub)class of:
767              
768             =over
769              
770             =item isaBar
771              
772             =item isaFoo
773              
774             =back
775              
776             =item Or, the values in C must be a reference of:
777              
778             =over
779              
780             =item refBar
781              
782             =item refFoo
783              
784             =back
785              
786             =item Or, the values in C must be a one of:
787              
788             =over
789              
790             =item valueBar
791              
792             =item valueFoo
793              
794             =back
795              
796             =back
797              
798             =item set_idx_m6( INDEX, VALUE )
799              
800             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
801              
802             =over
803              
804             =item The values in C must be a (sub)class of:
805              
806             =over
807              
808             =item isaBar
809              
810             =item isaFoo
811              
812             =back
813              
814             =item Or, the values in C must be a reference of:
815              
816             =over
817              
818             =item refBar
819              
820             =item refFoo
821              
822             =back
823              
824             =item Or, the values in C must be a one of:
825              
826             =over
827              
828             =item valueBar
829              
830             =item valueFoo
831              
832             =back
833              
834             =back
835              
836             =item set_idx_m7( INDEX, VALUE )
837              
838             Set value in not described option. C is the integer index which is greater than or equal to C<0>. C is the value.
839              
840             =over
841              
842             =item The values in C must be a (sub)class of:
843              
844             =over
845              
846             =item isaBar
847              
848             =item isaFoo
849              
850             =back
851              
852             =item Or, the values in C must be a reference of:
853              
854             =over
855              
856             =item refBar
857              
858             =item refFoo
859              
860             =back
861              
862             =item Or, the values in C must be a one of:
863              
864             =over
865              
866             =item valueBar
867              
868             =item valueFoo
869              
870             =back
871              
872             =back
873              
874             =item set_m1(ARRAY)
875              
876             Set not described option absolutely. C is the list value. On error an exception C is thrown.
877              
878             =item set_m10( [ KEY, VALUE ... ] )
879              
880             Set not described option absolutely using keys/values. C are key/value pairs. 0 or more of these pairs may be supplied. Each key in is allowed to occur only once. Multiple occurrences of the same key yield in the last occurring key to be inserted and the rest to be ignored. C must at least have one element. On error an exception C is thrown.
881              
882             =over
883              
884             =item The values in C must be a (sub)class of:
885              
886             =over
887              
888             =item isaBar
889              
890             =item isaFoo
891              
892             =back
893              
894             =item Or, the values in C must be a reference of:
895              
896             =over
897              
898             =item refBar
899              
900             =item refFoo
901              
902             =back
903              
904             =item Or, the values in C must match regular expression:
905              
906             =over
907              
908             =item ^\S+$
909              
910             =item ^\d+$
911              
912             =back
913              
914             =item Or, the values in C must be a one of:
915              
916             =over
917              
918             =item valueBar
919              
920             =item valueFoo
921              
922             =back
923              
924             =back
925              
926             =item set_m2(ARRAY)
927              
928             Set not described option absolutely. C is the list value. It must at least have one element. On error an exception C is thrown.
929              
930             =item set_m3(ARRAY)
931              
932             Set not described option absolutely. C is the list value. It must at least have one element. On error an exception C is thrown.
933              
934             =over
935              
936             =item The values in C must be a (sub)class of:
937              
938             =over
939              
940             =item isaBar
941              
942             =item isaFoo
943              
944             =back
945              
946             =back
947              
948             =item set_m4(ARRAY)
949              
950             Set not described option absolutely. C is the list value. It must at least have one element. On error an exception C is thrown.
951              
952             =over
953              
954             =item The values in C must be a (sub)class of:
955              
956             =over
957              
958             =item isaBar
959              
960             =item isaFoo
961              
962             =back
963              
964             =item Or, the values in C must be a reference of:
965              
966             =over
967              
968             =item refBar
969              
970             =item refFoo
971              
972             =back
973              
974             =back
975              
976             =item set_m5(ARRAY)
977              
978             Set not described option absolutely. C is the list value. It must at least have one element. On error an exception C is thrown.
979              
980             =over
981              
982             =item The values in C must be a (sub)class of:
983              
984             =over
985              
986             =item isaBar
987              
988             =item isaFoo
989              
990             =back
991              
992             =item Or, the values in C must be a reference of:
993              
994             =over
995              
996             =item refBar
997              
998             =item refFoo
999              
1000             =back
1001              
1002             =item Or, the values in C must be a one of:
1003              
1004             =over
1005              
1006             =item valueBar
1007              
1008             =item valueFoo
1009              
1010             =back
1011              
1012             =back
1013              
1014             =item set_m6(ARRAY)
1015              
1016             Set not described option absolutely. C is the list value. It must at least have one element. On error an exception C is thrown.
1017              
1018             =over
1019              
1020             =item The values in C must be a (sub)class of:
1021              
1022             =over
1023              
1024             =item isaBar
1025              
1026             =item isaFoo
1027              
1028             =back
1029              
1030             =item Or, the values in C must be a reference of:
1031              
1032             =over
1033              
1034             =item refBar
1035              
1036             =item refFoo
1037              
1038             =back
1039              
1040             =item Or, the values in C must be a one of:
1041              
1042             =over
1043              
1044             =item valueBar
1045              
1046             =item valueFoo
1047              
1048             =back
1049              
1050             =back
1051              
1052             =item set_m7(ARRAY)
1053              
1054             Set not described option absolutely. C is the list value. It must at least have one element. On error an exception C is thrown.
1055              
1056             =over
1057              
1058             =item The values in C must be a (sub)class of:
1059              
1060             =over
1061              
1062             =item isaBar
1063              
1064             =item isaFoo
1065              
1066             =back
1067              
1068             =item Or, the values in C must be a reference of:
1069              
1070             =over
1071              
1072             =item refBar
1073              
1074             =item refFoo
1075              
1076             =back
1077              
1078             =item Or, the values in C must be a one of:
1079              
1080             =over
1081              
1082             =item valueBar
1083              
1084             =item valueFoo
1085              
1086             =back
1087              
1088             =back
1089              
1090             =item set_m8(ARRAY)
1091              
1092             Set not described option absolutely. C is the list value. Each element in the list is allowed to occur only once. Multiple occurrences of the same element yield in the last occurring element to be inserted and the rest to be ignored. C must at least have one element. On error an exception C is thrown.
1093              
1094             =over
1095              
1096             =item The values in C must be a (sub)class of:
1097              
1098             =over
1099              
1100             =item isaBar
1101              
1102             =item isaFoo
1103              
1104             =back
1105              
1106             =item Or, the values in C must be a reference of:
1107              
1108             =over
1109              
1110             =item refBar
1111              
1112             =item refFoo
1113              
1114             =back
1115              
1116             =item Or, the values in C must be a one of:
1117              
1118             =over
1119              
1120             =item valueBar
1121              
1122             =item valueFoo
1123              
1124             =back
1125              
1126             =back
1127              
1128             =item set_m9(ARRAY)
1129              
1130             Set not described option absolutely. C is the list value. Each element in the list is allowed to occur only once. Multiple occurrences of the same element yield in the first occurring element to be inserted and the rest to be ignored. C must at least have one element. On error an exception C is thrown.
1131              
1132             =over
1133              
1134             =item The values in C must be a (sub)class of:
1135              
1136             =over
1137              
1138             =item isaBar
1139              
1140             =item isaFoo
1141              
1142             =back
1143              
1144             =item Or, the values in C must be a reference of:
1145              
1146             =over
1147              
1148             =item refBar
1149              
1150             =item refFoo
1151              
1152             =back
1153              
1154             =item Or, the values in C must be a one of:
1155              
1156             =over
1157              
1158             =item valueBar
1159              
1160             =item valueFoo
1161              
1162             =back
1163              
1164             =back
1165              
1166             =item set_num_m1( NUMBER, VALUE )
1167              
1168             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1169              
1170             =item set_num_m2( NUMBER, VALUE )
1171              
1172             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1173              
1174             =item set_num_m3( NUMBER, VALUE )
1175              
1176             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1177              
1178             =over
1179              
1180             =item The values in C must be a (sub)class of:
1181              
1182             =over
1183              
1184             =item isaBar
1185              
1186             =item isaFoo
1187              
1188             =back
1189              
1190             =back
1191              
1192             =item set_num_m4( NUMBER, VALUE )
1193              
1194             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1195              
1196             =over
1197              
1198             =item The values in C must be a (sub)class of:
1199              
1200             =over
1201              
1202             =item isaBar
1203              
1204             =item isaFoo
1205              
1206             =back
1207              
1208             =item Or, the values in C must be a reference of:
1209              
1210             =over
1211              
1212             =item refBar
1213              
1214             =item refFoo
1215              
1216             =back
1217              
1218             =back
1219              
1220             =item set_num_m5( NUMBER, VALUE )
1221              
1222             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1223              
1224             =over
1225              
1226             =item The values in C must be a (sub)class of:
1227              
1228             =over
1229              
1230             =item isaBar
1231              
1232             =item isaFoo
1233              
1234             =back
1235              
1236             =item Or, the values in C must be a reference of:
1237              
1238             =over
1239              
1240             =item refBar
1241              
1242             =item refFoo
1243              
1244             =back
1245              
1246             =item Or, the values in C must be a one of:
1247              
1248             =over
1249              
1250             =item valueBar
1251              
1252             =item valueFoo
1253              
1254             =back
1255              
1256             =back
1257              
1258             =item set_num_m6( NUMBER, VALUE )
1259              
1260             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1261              
1262             =over
1263              
1264             =item The values in C must be a (sub)class of:
1265              
1266             =over
1267              
1268             =item isaBar
1269              
1270             =item isaFoo
1271              
1272             =back
1273              
1274             =item Or, the values in C must be a reference of:
1275              
1276             =over
1277              
1278             =item refBar
1279              
1280             =item refFoo
1281              
1282             =back
1283              
1284             =item Or, the values in C must be a one of:
1285              
1286             =over
1287              
1288             =item valueBar
1289              
1290             =item valueFoo
1291              
1292             =back
1293              
1294             =back
1295              
1296             =item set_num_m7( NUMBER, VALUE )
1297              
1298             Set value in not described option. C is the integer index which is greater than C<0>. C is the value.
1299              
1300             =over
1301              
1302             =item The values in C must be a (sub)class of:
1303              
1304             =over
1305              
1306             =item isaBar
1307              
1308             =item isaFoo
1309              
1310             =back
1311              
1312             =item Or, the values in C must be a reference of:
1313              
1314             =over
1315              
1316             =item refBar
1317              
1318             =item refFoo
1319              
1320             =back
1321              
1322             =item Or, the values in C must be a one of:
1323              
1324             =over
1325              
1326             =item valueBar
1327              
1328             =item valueFoo
1329              
1330             =back
1331              
1332             =back
1333              
1334             =item set_s1(VALUE)
1335              
1336             Set not described option. C is the value. On error an exception C is thrown.
1337              
1338             =item set_s2(VALUE)
1339              
1340             Set not described option. C is the value. C may not be C. On error an exception C is thrown.
1341              
1342             =item set_s3(VALUE)
1343              
1344             Set not described option. C is the value. C may not be C. On error an exception C is thrown.
1345              
1346             =over
1347              
1348             =item VALUE must be a (sub)class of:
1349              
1350             =over
1351              
1352             =item isaBar
1353              
1354             =item isaFoo
1355              
1356             =back
1357              
1358             =back
1359              
1360             =item set_s4(VALUE)
1361              
1362             Set not described option. C is the value. C may not be C. On error an exception C is thrown.
1363              
1364             =over
1365              
1366             =item VALUE must be a (sub)class of:
1367              
1368             =over
1369              
1370             =item isaBar
1371              
1372             =item isaFoo
1373              
1374             =back
1375              
1376             =item Or, VALUE must be a reference of:
1377              
1378             =over
1379              
1380             =item refBar
1381              
1382             =item refFoo
1383              
1384             =back
1385              
1386             =back
1387              
1388             =item set_s5(VALUE)
1389              
1390             Set not described option. C is the value. C may not be C. On error an exception C is thrown.
1391              
1392             =over
1393              
1394             =item VALUE must be a (sub)class of:
1395              
1396             =over
1397              
1398             =item isaBar
1399              
1400             =item isaFoo
1401              
1402             =back
1403              
1404             =item Or, VALUE must be a reference of:
1405              
1406             =over
1407              
1408             =item refBar
1409              
1410             =item refFoo
1411              
1412             =back
1413              
1414             =item Or, VALUE must be a one of:
1415              
1416             =over
1417              
1418             =item valueBar
1419              
1420             =item valueFoo
1421              
1422             =back
1423              
1424             =back
1425              
1426             =item set_s6(VALUE)
1427              
1428             Set not described option. C is the value. C may not be C. On error an exception C is thrown.
1429              
1430             =over
1431              
1432             =item VALUE must be a (sub)class of:
1433              
1434             =over
1435              
1436             =item isaBar
1437              
1438             =item isaFoo
1439              
1440             =back
1441              
1442             =item Or, VALUE must be a reference of:
1443              
1444             =over
1445              
1446             =item refBar
1447              
1448             =item refFoo
1449              
1450             =back
1451              
1452             =item Or, VALUE must be a one of:
1453              
1454             =over
1455              
1456             =item valueBar
1457              
1458             =item valueFoo
1459              
1460             =back
1461              
1462             =back
1463              
1464             =item shift_m1()
1465              
1466             Shift and return an element off not described option. On error an exception C is thrown.
1467              
1468             =item shift_m2()
1469              
1470             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1471              
1472             =item shift_m3()
1473              
1474             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1475              
1476             =item shift_m4()
1477              
1478             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1479              
1480             =item shift_m5()
1481              
1482             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1483              
1484             =item shift_m6()
1485              
1486             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1487              
1488             =item shift_m7()
1489              
1490             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1491              
1492             =item shift_m9()
1493              
1494             Shift and return an element off not described option. After shifting at least one element must remain. On error an exception C is thrown.
1495              
1496             =item unshift_m1(ARRAY)
1497              
1498             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1499              
1500             =item unshift_m2(ARRAY)
1501              
1502             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1503              
1504             =item unshift_m3(ARRAY)
1505              
1506             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1507              
1508             =over
1509              
1510             =item The values in C must be a (sub)class of:
1511              
1512             =over
1513              
1514             =item isaBar
1515              
1516             =item isaFoo
1517              
1518             =back
1519              
1520             =back
1521              
1522             =item unshift_m4(ARRAY)
1523              
1524             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1525              
1526             =over
1527              
1528             =item The values in C must be a (sub)class of:
1529              
1530             =over
1531              
1532             =item isaBar
1533              
1534             =item isaFoo
1535              
1536             =back
1537              
1538             =item Or, the values in C must be a reference of:
1539              
1540             =over
1541              
1542             =item refBar
1543              
1544             =item refFoo
1545              
1546             =back
1547              
1548             =back
1549              
1550             =item unshift_m5(ARRAY)
1551              
1552             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1553              
1554             =over
1555              
1556             =item The values in C must be a (sub)class of:
1557              
1558             =over
1559              
1560             =item isaBar
1561              
1562             =item isaFoo
1563              
1564             =back
1565              
1566             =item Or, the values in C must be a reference of:
1567              
1568             =over
1569              
1570             =item refBar
1571              
1572             =item refFoo
1573              
1574             =back
1575              
1576             =item Or, the values in C must be a one of:
1577              
1578             =over
1579              
1580             =item valueBar
1581              
1582             =item valueFoo
1583              
1584             =back
1585              
1586             =back
1587              
1588             =item unshift_m6(ARRAY)
1589              
1590             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1591              
1592             =over
1593              
1594             =item The values in C must be a (sub)class of:
1595              
1596             =over
1597              
1598             =item isaBar
1599              
1600             =item isaFoo
1601              
1602             =back
1603              
1604             =item Or, the values in C must be a reference of:
1605              
1606             =over
1607              
1608             =item refBar
1609              
1610             =item refFoo
1611              
1612             =back
1613              
1614             =item Or, the values in C must be a one of:
1615              
1616             =over
1617              
1618             =item valueBar
1619              
1620             =item valueFoo
1621              
1622             =back
1623              
1624             =back
1625              
1626             =item unshift_m7(ARRAY)
1627              
1628             Unshift additional values on not described option. C is the list value. On error an exception C is thrown.
1629              
1630             =over
1631              
1632             =item The values in C must be a (sub)class of:
1633              
1634             =over
1635              
1636             =item isaBar
1637              
1638             =item isaFoo
1639              
1640             =back
1641              
1642             =item Or, the values in C must be a reference of:
1643              
1644             =over
1645              
1646             =item refBar
1647              
1648             =item refFoo
1649              
1650             =back
1651              
1652             =item Or, the values in C must be a one of:
1653              
1654             =over
1655              
1656             =item valueBar
1657              
1658             =item valueFoo
1659              
1660             =back
1661              
1662             =back
1663              
1664             =item unshift_m9(ARRAY)
1665              
1666             Unshift additional values on not described option. C is the list value. The push may not yield to multiple identical elements in the list. Hence, multiple occurrences of the same element are ignored. On error an exception C is thrown.
1667              
1668             =over
1669              
1670             =item The values in C must be a (sub)class of:
1671              
1672             =over
1673              
1674             =item isaBar
1675              
1676             =item isaFoo
1677              
1678             =back
1679              
1680             =item Or, the values in C must be a reference of:
1681              
1682             =over
1683              
1684             =item refBar
1685              
1686             =item refFoo
1687              
1688             =back
1689              
1690             =item Or, the values in C must be a one of:
1691              
1692             =over
1693              
1694             =item valueBar
1695              
1696             =item valueFoo
1697              
1698             =back
1699              
1700             =back
1701              
1702             =item values_m10( [ KEY_ARRAY ] )
1703              
1704             Returns an C containing the values of not described option. If C contains one or more Cs the values related to the Cs are returned. If no Cs specified all values are returned.
1705              
1706             =item values_m8()
1707              
1708             Returns an C containing all values of not described option.
1709              
1710             =back
1711              
1712             =head1 SEE ALSO
1713              
1714             TODO
1715              
1716             =head1 BUGS
1717              
1718             None known (yet.)
1719              
1720             =head1 HISTORY
1721              
1722             First development: September 2014
1723             Last update: September 2014
1724              
1725             =head1 AUTHOR
1726              
1727             root
1728              
1729             =head1 COPYRIGHT
1730              
1731             Copyright 2014 by root
1732              
1733             =head1 LICENSE
1734              
1735             TODO
1736             =cut
1737              
1738             sub new {
1739 4     4 1 1207 my $class = shift;
1740              
1741 4         7 my $self = {};
1742 4   33     19 bless( $self, ( ref($class) || $class ) );
1743 4         13 return( $self->_initialize(@_) );
1744             }
1745              
1746 0     0 1 0 sub new_by_foo {
1747             }
1748              
1749             sub _initialize {
1750 4     4   5 my $self = shift;
1751 4 50       8 my $opt = defined($_[0]) ? shift : {};
1752              
1753             # Check $opt
1754 4 50       13 ref($opt) eq 'HASH' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, first argument must be 'HASH' reference.");
1755              
1756             # b1, BOOLEAN
1757 4 50       9 exists( $opt->{b1} ) && $self->set_b1( $opt->{b1} );
1758              
1759             # b2, BOOLEAN, with default value
1760 4 50       17 $self->set_b2( exists( $opt->{b2} ) ? $opt->{b2} : $DEFAULT_VALUE{b2} );
1761              
1762             # b3, BOOLEAN, mandatory
1763 4 100       17 exists( $opt->{b3} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'b3' is mandatory.");
1764 3         7 $self->set_b3( $opt->{b3} );
1765              
1766             # b4, BOOLEAN, mandatory, with default value
1767 3 100       11 exists( $opt->{b4} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'b4' is mandatory.");
1768 2         6 $self->set_b4( $opt->{b4} );
1769              
1770             # m1, MULTI
1771 2 50       5 if ( exists( $opt->{m1} ) ) {
1772 0 0       0 ref( $opt->{m1} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm1' must be an 'ARRAY' reference.");
1773 0         0 $self->set_m1( @{ $opt->{m1} } );
  0         0  
1774             }
1775             else {
1776 2         8 $self->set_m1();
1777             }
1778              
1779             # m10, MULTI, mandatory
1780 2 50       7 exists( $opt->{m10} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'm10' is mandatory.");
1781 2 50       18 ref( $opt->{m10} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm10' must be an 'ARRAY' reference.");
1782 2         3 $self->set_m10( @{ $opt->{m10} } );
  2         6  
1783              
1784             # m2, MULTI
1785 2 50       9 if ( exists( $opt->{m2} ) ) {
1786 2 50       7 ref( $opt->{m2} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm2' must be an 'ARRAY' reference.");
1787 2         2 $self->set_m2( @{ $opt->{m2} } );
  2         8  
1788             }
1789             else {
1790 0         0 $self->set_m2();
1791             }
1792              
1793             # m3, MULTI
1794 2 50       10 if ( exists( $opt->{m3} ) ) {
1795 2 50       7 ref( $opt->{m3} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm3' must be an 'ARRAY' reference.");
1796 2         3 $self->set_m3( @{ $opt->{m3} } );
  2         8  
1797             }
1798             else {
1799 0         0 $self->set_m3();
1800             }
1801              
1802             # m4, MULTI
1803 2 50       6 if ( exists( $opt->{m4} ) ) {
1804 2 50       6 ref( $opt->{m4} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm4' must be an 'ARRAY' reference.");
1805 2         3 $self->set_m4( @{ $opt->{m4} } );
  2         6  
1806             }
1807             else {
1808 0         0 $self->set_m4();
1809             }
1810              
1811             # m5, MULTI
1812 2 50       11 if ( exists( $opt->{m5} ) ) {
1813 2 50       7 ref( $opt->{m5} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm5' must be an 'ARRAY' reference.");
1814 2         3 $self->set_m5( @{ $opt->{m5} } );
  2         9  
1815             }
1816             else {
1817 0         0 $self->set_m5();
1818             }
1819              
1820             # m6, MULTI, mandatory
1821 2 50       7 exists( $opt->{m6} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'm6' is mandatory.");
1822 2 50       7 ref( $opt->{m6} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm6' must be an 'ARRAY' reference.");
1823 2         2 $self->set_m6( @{ $opt->{m6} } );
  2         6  
1824              
1825             # m7, MULTI, mandatory
1826 2 50       6 exists( $opt->{m7} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'm7' is mandatory.");
1827 2 50       6 ref( $opt->{m7} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm7' must be an 'ARRAY' reference.");
1828 2         7 $self->set_m7( @{ $opt->{m7} } );
  2         7  
1829              
1830             # m8, MULTI, mandatory
1831 2 50       5 exists( $opt->{m8} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'm8' is mandatory.");
1832 2 50       7 ref( $opt->{m8} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm8' must be an 'ARRAY' reference.");
1833 2         2 $self->set_m8( @{ $opt->{m8} } );
  2         13  
1834              
1835             # m9, MULTI, mandatory
1836 2 50       5 exists( $opt->{m9} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 'm9' is mandatory.");
1837 2 50       7 ref( $opt->{m9} ) eq 'ARRAY' || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, specified value for option 'm9' must be an 'ARRAY' reference.");
1838 2         2 $self->set_m9( @{ $opt->{m9} } );
  2         8  
1839              
1840             # s1, SINGLE
1841 2 50       7 exists( $opt->{s1} ) && $self->set_s1( $opt->{s1} );
1842              
1843             # s2, SINGLE
1844 2 50       6 exists( $opt->{s2} ) && $self->set_s2( $opt->{s2} );
1845              
1846             # s3, SINGLE
1847 2 50       4 exists( $opt->{s3} ) && $self->set_s3( $opt->{s3} );
1848              
1849             # s4, SINGLE
1850 2 50       32 exists( $opt->{s4} ) && $self->set_s4( $opt->{s4} );
1851              
1852             # s5, SINGLE
1853 2 50       6 exists( $opt->{s5} ) && $self->set_s5( $opt->{s5} );
1854              
1855             # s6, SINGLE, mandatory
1856 2 50       5 exists( $opt->{s6} ) || throw Error::Simple("ERROR: tmp::TestPkg::_initialize, option 's6' is mandatory.");
1857 2         8 $self->set_s6( $opt->{s6} );
1858              
1859             # Return $self
1860 2         7 return($self);
1861             }
1862              
1863             sub _value_is_allowed {
1864 22     22   32 my $name = shift;
1865              
1866             # Value is allowed if no ALLOW clauses exist for the named attribute
1867 22 50 66     68 if ( ! exists( $ALLOW_ISA{$name} ) && ! exists( $ALLOW_REF{$name} ) && ! exists( $ALLOW_RX{$name} ) && ! exists( $ALLOW_VALUE{$name} ) ) {
      33        
      33        
1868 4         12 return(1);
1869             }
1870              
1871             # At this point, all values in @_ must to be allowed
1872             CHECK_VALUES:
1873 18         28 foreach my $val (@_) {
1874             # Check ALLOW_ISA
1875 18 100 66     70 if ( ref($val) && exists( $ALLOW_ISA{$name} ) ) {
1876 15         13 foreach my $class ( @{ $ALLOW_ISA{$name} } ) {
  15         34  
1877 15 50       70 &UNIVERSAL::isa( $val, $class ) && next CHECK_VALUES;
1878             }
1879             }
1880              
1881             # Check ALLOW_REF
1882 3 50 33     28 if ( ref($val) && exists( $ALLOW_REF{$name} ) ) {
1883 0 0       0 exists( $ALLOW_REF{$name}{ ref($val) } ) && next CHECK_VALUES;
1884             }
1885              
1886             # Check ALLOW_RX
1887 3 100 33     31 if ( defined($val) && ! ref($val) && exists( $ALLOW_RX{$name} ) ) {
      66        
1888 2         3 foreach my $rx ( @{ $ALLOW_RX{$name} } ) {
  2         4  
1889 2 50       40 $val =~ /$rx/ && next CHECK_VALUES;
1890             }
1891             }
1892              
1893             # Check ALLOW_VALUE
1894 1 50 33     12 if ( ! ref($val) && exists( $ALLOW_VALUE{$name} ) ) {
1895 1 50       5 exists( $ALLOW_VALUE{$name}{$val} ) && next CHECK_VALUES;
1896             }
1897              
1898             # We caught a not allowed value
1899 0         0 return(0);
1900             }
1901              
1902             # OK, all values are allowed
1903 18         62 return(1);
1904             }
1905              
1906             sub add_m10 {
1907 0     0 1 0 my $self = shift;
1908              
1909             # Separate keys/values
1910 0         0 my @key = ();
1911 0         0 my @value = ();
1912 0         0 while ( my $key = shift(@_) ) {
1913 0         0 push( @key, $key );
1914 0         0 push( @value, shift(@_) );
1915             }
1916              
1917             # Check if isas/refs/rxs/values are allowed
1918 0 0       0 &_value_is_allowed( 'm10', @value ) || throw Error::Simple("ERROR: tmp::TestPkg::add_m10, one or more specified value(s) '@value' is/are not allowed.");
1919              
1920             # Add keys/values
1921 0         0 foreach my $key (@key) {
1922 0         0 $self->{tmp_TestPkg}{m10}{$key} = shift(@value);
1923             }
1924             }
1925              
1926             sub add_m8 {
1927 0     0 1 0 my $self = shift;
1928              
1929             # Check if isas/refs/rxs/values are allowed
1930 0 0       0 &_value_is_allowed( 'm8', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::add_m8, one or more specified value(s) '@_' is/are not allowed.");
1931              
1932             # Add values
1933 0         0 foreach my $val (@_) {
1934 0         0 $self->{tmp_TestPkg}{m8}{$val} = $val;
1935             }
1936             }
1937              
1938             sub delete_m10 {
1939 0     0 1 0 my $self = shift;
1940              
1941             # List value for 'm10' is not allowed to be empty
1942 0         0 my %would_delete = ();
1943 0         0 foreach my $val (@_) {
1944 0 0       0 $would_delete{$val} = $val if ( exists( $self->{tmp_TestPkg}{m10}{$val} ) )
1945             }
1946 0 0       0 ( scalar( keys( %{ $self->{tmp_TestPkg}{m10} } ) ) == scalar( keys( %would_delete) ) ) && throw Error::Simple("ERROR: tmp::TestPkg::delete_m10, list value may not be empty.");
  0         0  
1947              
1948             # Delete values
1949 0         0 my $del = 0;
1950 0         0 foreach my $val (@_) {
1951 0 0       0 exists( $self->{tmp_TestPkg}{m10}{$val} ) || next;
1952 0         0 delete( $self->{tmp_TestPkg}{m10}{$val} );
1953 0         0 $del ++;
1954             }
1955 0         0 return($del);
1956             }
1957              
1958             sub delete_m8 {
1959 0     0 1 0 my $self = shift;
1960              
1961             # List value for 'm8' is not allowed to be empty
1962 0         0 my %would_delete = ();
1963 0         0 foreach my $val (@_) {
1964 0 0       0 $would_delete{$val} = $val if ( exists( $self->{tmp_TestPkg}{m8}{$val} ) );
1965             }
1966 0 0       0 ( scalar( keys( %{ $self->{tmp_TestPkg}{m8} } ) ) == scalar( keys(%would_delete) ) ) && throw Error::Simple("ERROR: tmp::TestPkg::delete_m8, list value may not be empty.");
  0         0  
1967              
1968             # Delete values
1969 0         0 my $del = 0;
1970 0         0 foreach my $val (@_) {
1971 0 0       0 exists( $self->{tmp_TestPkg}{m8}{$val} ) || next;
1972 0         0 delete( $self->{tmp_TestPkg}{m8}{$val} );
1973 0         0 $del ++;
1974             }
1975 0         0 return($del);
1976             }
1977              
1978 0     0 1 0 sub do_foo {
1979             }
1980              
1981             sub exists_m1 {
1982 0     0 1 0 my $self = shift;
1983              
1984             # Count occurrences
1985 0         0 my $count = 0;
1986 0         0 foreach my $val1 (@_) {
1987 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m1} } ) {
  0         0  
1988 0 0       0 ( $val1 eq $val2 ) && $count ++;
1989             }
1990             }
1991 0         0 return($count);
1992             }
1993              
1994             sub exists_m10 {
1995 0     0 1 0 my $self = shift;
1996              
1997             # Count occurrences
1998 0         0 my $count = 0;
1999 0         0 foreach my $val (@_) {
2000 0         0 $count += exists( $self->{tmp_TestPkg}{m10}{$val} );
2001             }
2002 0         0 return($count);
2003             }
2004              
2005             sub exists_m2 {
2006 0     0 1 0 my $self = shift;
2007              
2008             # Count occurrences
2009 0         0 my $count = 0;
2010 0         0 foreach my $val1 (@_) {
2011 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m2} } ) {
  0         0  
2012 0 0       0 ( $val1 eq $val2 ) && $count ++;
2013             }
2014             }
2015 0         0 return($count);
2016             }
2017              
2018             sub exists_m3 {
2019 0     0 1 0 my $self = shift;
2020              
2021             # Count occurrences
2022 0         0 my $count = 0;
2023 0         0 foreach my $val1 (@_) {
2024 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m3} } ) {
  0         0  
2025 0 0       0 ( $val1 eq $val2 ) && $count ++;
2026             }
2027             }
2028 0         0 return($count);
2029             }
2030              
2031             sub exists_m4 {
2032 0     0 1 0 my $self = shift;
2033              
2034             # Count occurrences
2035 0         0 my $count = 0;
2036 0         0 foreach my $val1 (@_) {
2037 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m4} } ) {
  0         0  
2038 0 0       0 ( $val1 eq $val2 ) && $count ++;
2039             }
2040             }
2041 0         0 return($count);
2042             }
2043              
2044             sub exists_m5 {
2045 0     0 1 0 my $self = shift;
2046              
2047             # Count occurrences
2048 0         0 my $count = 0;
2049 0         0 foreach my $val1 (@_) {
2050 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m5} } ) {
  0         0  
2051 0 0       0 ( $val1 eq $val2 ) && $count ++;
2052             }
2053             }
2054 0         0 return($count);
2055             }
2056              
2057             sub exists_m6 {
2058 0     0 1 0 my $self = shift;
2059              
2060             # Count occurrences
2061 0         0 my $count = 0;
2062 0         0 foreach my $val1 (@_) {
2063 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m6} } ) {
  0         0  
2064 0 0       0 ( $val1 eq $val2 ) && $count ++;
2065             }
2066             }
2067 0         0 return($count);
2068             }
2069              
2070             sub exists_m7 {
2071 0     0 1 0 my $self = shift;
2072              
2073             # Count occurrences
2074 0         0 my $count = 0;
2075 0         0 foreach my $val1 (@_) {
2076 0         0 foreach my $val2 ( @{ $self->{tmp_TestPkg}{m7} } ) {
  0         0  
2077 0 0       0 ( $val1 eq $val2 ) && $count ++;
2078             }
2079             }
2080 0         0 return($count);
2081             }
2082              
2083             sub exists_m8 {
2084 0     0 1 0 my $self = shift;
2085              
2086             # Count occurrences
2087 0         0 my $count = 0;
2088 0         0 foreach my $val (@_) {
2089 0         0 $count += exists( $self->{tmp_TestPkg}{m8}{$val} );
2090             }
2091 0         0 return($count);
2092             }
2093              
2094             sub exists_m9 {
2095 0     0 1 0 my $self = shift;
2096              
2097             # Count occurrences
2098 0         0 my $count = 0;
2099 0         0 foreach my $val (@_) {
2100 0         0 $count += exists( $self->{tmp_TestPkg}{m9}{HASH}{$val} );
2101             }
2102 0         0 return($count);
2103             }
2104              
2105             sub get_m1 {
2106 0     0 1 0 my $self = shift;
2107              
2108 0 0       0 if ( scalar(@_) ) {
2109 0         0 my @ret = ();
2110 0         0 foreach my $i (@_) {
2111 0         0 push( @ret, $self->{tmp_TestPkg}{m1}[ int($i) ] );
2112             }
2113 0         0 return(@ret);
2114             }
2115             else {
2116             # Return the full list
2117 0         0 return( @{ $self->{tmp_TestPkg}{m1} } );
  0         0  
2118             }
2119             }
2120              
2121             sub get_m2 {
2122 0     0 1 0 my $self = shift;
2123              
2124 0 0       0 if ( scalar(@_) ) {
2125 0         0 my @ret = ();
2126 0         0 foreach my $i (@_) {
2127 0         0 push( @ret, $self->{tmp_TestPkg}{m2}[ int($i) ] );
2128             }
2129 0         0 return(@ret);
2130             }
2131             else {
2132             # Return the full list
2133 0         0 return( @{ $self->{tmp_TestPkg}{m2} } );
  0         0  
2134             }
2135             }
2136              
2137             sub get_m3 {
2138 0     0 1 0 my $self = shift;
2139              
2140 0 0       0 if ( scalar(@_) ) {
2141 0         0 my @ret = ();
2142 0         0 foreach my $i (@_) {
2143 0         0 push( @ret, $self->{tmp_TestPkg}{m3}[ int($i) ] );
2144             }
2145 0         0 return(@ret);
2146             }
2147             else {
2148             # Return the full list
2149 0         0 return( @{ $self->{tmp_TestPkg}{m3} } );
  0         0  
2150             }
2151             }
2152              
2153             sub get_m4 {
2154 0     0 1 0 my $self = shift;
2155              
2156 0 0       0 if ( scalar(@_) ) {
2157 0         0 my @ret = ();
2158 0         0 foreach my $i (@_) {
2159 0         0 push( @ret, $self->{tmp_TestPkg}{m4}[ int($i) ] );
2160             }
2161 0         0 return(@ret);
2162             }
2163             else {
2164             # Return the full list
2165 0         0 return( @{ $self->{tmp_TestPkg}{m4} } );
  0         0  
2166             }
2167             }
2168              
2169             sub get_m5 {
2170 0     0 1 0 my $self = shift;
2171              
2172 0 0       0 if ( scalar(@_) ) {
2173 0         0 my @ret = ();
2174 0         0 foreach my $i (@_) {
2175 0         0 push( @ret, $self->{tmp_TestPkg}{m5}[ int($i) ] );
2176             }
2177 0         0 return(@ret);
2178             }
2179             else {
2180             # Return the full list
2181 0         0 return( @{ $self->{tmp_TestPkg}{m5} } );
  0         0  
2182             }
2183             }
2184              
2185             sub get_m6 {
2186 0     0 1 0 my $self = shift;
2187              
2188 0 0       0 if ( scalar(@_) ) {
2189 0         0 my @ret = ();
2190 0         0 foreach my $i (@_) {
2191 0         0 push( @ret, $self->{tmp_TestPkg}{m6}[ int($i) ] );
2192             }
2193 0         0 return(@ret);
2194             }
2195             else {
2196             # Return the full list
2197 0         0 return( @{ $self->{tmp_TestPkg}{m6} } );
  0         0  
2198             }
2199             }
2200              
2201             sub get_m7 {
2202 0     0 1 0 my $self = shift;
2203              
2204 0 0       0 if ( scalar(@_) ) {
2205 0         0 my @ret = ();
2206 0         0 foreach my $i (@_) {
2207 0         0 push( @ret, $self->{tmp_TestPkg}{m7}[ int($i) ] );
2208             }
2209 0         0 return(@ret);
2210             }
2211             else {
2212             # Return the full list
2213 0         0 return( @{ $self->{tmp_TestPkg}{m7} } );
  0         0  
2214             }
2215             }
2216              
2217             sub get_m9 {
2218 0     0 1 0 my $self = shift;
2219              
2220 0 0       0 if ( scalar(@_) ) {
2221 0         0 my @ret = ();
2222 0         0 foreach my $i (@_) {
2223 0         0 push( @ret, $self->{tmp_TestPkg}{m9}{ARRAY}[ int($i) ] );
2224             }
2225 0         0 return(@ret);
2226             }
2227             else {
2228             # Return the list
2229 0         0 return( @{ $self->{tmp_TestPkg}{m9}{ARRAY} } );
  0         0  
2230             }
2231             }
2232              
2233             sub get_s1 {
2234 0     0 1 0 my $self = shift;
2235              
2236 0         0 return( $self->{tmp_TestPkg}{s1} );
2237             }
2238              
2239             sub get_s2 {
2240 0     0 1 0 my $self = shift;
2241              
2242 0         0 return( $self->{tmp_TestPkg}{s2} );
2243             }
2244              
2245             sub get_s3 {
2246 0     0 1 0 my $self = shift;
2247              
2248 0         0 return( $self->{tmp_TestPkg}{s3} );
2249             }
2250              
2251             sub get_s4 {
2252 0     0 1 0 my $self = shift;
2253              
2254 0         0 return( $self->{tmp_TestPkg}{s4} );
2255             }
2256              
2257             sub get_s5 {
2258 0     0 1 0 my $self = shift;
2259              
2260 0         0 return( $self->{tmp_TestPkg}{s5} );
2261             }
2262              
2263             sub get_s6 {
2264 0     0 1 0 my $self = shift;
2265              
2266 0         0 return( $self->{tmp_TestPkg}{s6} );
2267             }
2268              
2269             sub is_b1 {
2270 0     0 1 0 my $self = shift;
2271              
2272 0 0       0 if ( $self->{tmp_TestPkg}{b1} ) {
2273 0         0 return(1);
2274             }
2275             else {
2276 0         0 return(0);
2277             }
2278             }
2279              
2280             sub is_b2 {
2281 0     0 1 0 my $self = shift;
2282              
2283 0 0       0 if ( $self->{tmp_TestPkg}{b2} ) {
2284 0         0 return(1);
2285             }
2286             else {
2287 0         0 return(0);
2288             }
2289             }
2290              
2291             sub is_b3 {
2292 0     0 1 0 my $self = shift;
2293              
2294 0 0       0 if ( $self->{tmp_TestPkg}{b3} ) {
2295 0         0 return(1);
2296             }
2297             else {
2298 0         0 return(0);
2299             }
2300             }
2301              
2302             sub is_b4 {
2303 0     0 1 0 my $self = shift;
2304              
2305 0 0       0 if ( $self->{tmp_TestPkg}{b4} ) {
2306 0         0 return(1);
2307             }
2308             else {
2309 0         0 return(0);
2310             }
2311             }
2312              
2313             sub keys_m10 {
2314 0     0 1 0 my $self = shift;
2315              
2316             # Return all keys
2317 0         0 return( keys( %{ $self->{tmp_TestPkg}{m10} } ) );
  0         0  
2318             }
2319              
2320             sub pop_m1 {
2321 0     0 1 0 my $self = shift;
2322              
2323             # Pop an element from the list
2324 0         0 return( pop( @{ $self->{tmp_TestPkg}{m1} } ) );
  0         0  
2325             }
2326              
2327             sub pop_m2 {
2328 0     0 1 0 my $self = shift;
2329              
2330             # List value for 'm2' is not allowed to be empty
2331 0 0       0 (scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m2, list value may not be empty.");
2332              
2333             # Pop an element from the list
2334 0         0 return( pop( @{ $self->{tmp_TestPkg}{m2} } ) );
  0         0  
2335             }
2336              
2337             sub pop_m3 {
2338 0     0 1 0 my $self = shift;
2339              
2340             # List value for 'm3' is not allowed to be empty
2341 0 0       0 (scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m3, list value may not be empty.");
2342              
2343             # Pop an element from the list
2344 0         0 return( pop( @{ $self->{tmp_TestPkg}{m3} } ) );
  0         0  
2345             }
2346              
2347             sub pop_m4 {
2348 0     0 1 0 my $self = shift;
2349              
2350             # List value for 'm4' is not allowed to be empty
2351 0 0       0 (scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m4, list value may not be empty.");
2352              
2353             # Pop an element from the list
2354 0         0 return( pop( @{ $self->{tmp_TestPkg}{m4} } ) );
  0         0  
2355             }
2356              
2357             sub pop_m5 {
2358 0     0 1 0 my $self = shift;
2359              
2360             # List value for 'm5' is not allowed to be empty
2361 0 0       0 (scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m5, list value may not be empty.");
2362              
2363             # Pop an element from the list
2364 0         0 return( pop( @{ $self->{tmp_TestPkg}{m5} } ) );
  0         0  
2365             }
2366              
2367             sub pop_m6 {
2368 0     0 1 0 my $self = shift;
2369              
2370             # List value for 'm6' is not allowed to be empty
2371 0 0       0 (scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m6, list value may not be empty.");
2372              
2373             # Pop an element from the list
2374 0         0 return( pop( @{ $self->{tmp_TestPkg}{m6} } ) );
  0         0  
2375             }
2376              
2377             sub pop_m7 {
2378 0     0 1 0 my $self = shift;
2379              
2380             # List value for 'm7' is not allowed to be empty
2381 0 0       0 (scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m7, list value may not be empty.");
2382              
2383             # Pop an element from the list
2384 0         0 return( pop( @{ $self->{tmp_TestPkg}{m7} } ) );
  0         0  
2385             }
2386              
2387             sub pop_m9 {
2388 0     0 1 0 my $self = shift;
2389              
2390             # List value for 'm9' is not allowed to be empty
2391 0 0       0 ( scalar(@_) > 1) || throw Error::Simple("ERROR: tmp::TestPkg::pop_m9, list value may not be empty.");
2392              
2393             # Pop value
2394 0         0 my $val = pop( @{ $self->{tmp_TestPkg}{m9}{ARRAY} } );
  0         0  
2395 0         0 delete( $self->{tmp_TestPkg}{m9}{HASH}{$val} );
2396 0         0 return($val);
2397             }
2398              
2399             sub push_m1 {
2400 0     0 1 0 my $self = shift;
2401              
2402             # Check if isas/refs/rxs/values are allowed
2403 0 0       0 &_value_is_allowed( 'm1', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m1, one or more specified value(s) '@_' is/are not allowed.");
2404              
2405             # Push the list
2406 0         0 push( @{ $self->{tmp_TestPkg}{m1} }, @_ );
  0         0  
2407             }
2408              
2409             sub push_m2 {
2410 0     0 1 0 my $self = shift;
2411              
2412             # Check if isas/refs/rxs/values are allowed
2413 0 0       0 &_value_is_allowed( 'm2', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m2, one or more specified value(s) '@_' is/are not allowed.");
2414              
2415             # Push the list
2416 0         0 push( @{ $self->{tmp_TestPkg}{m2} }, @_ );
  0         0  
2417             }
2418              
2419             sub push_m3 {
2420 0     0 1 0 my $self = shift;
2421              
2422             # Check if isas/refs/rxs/values are allowed
2423 0 0       0 &_value_is_allowed( 'm3', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m3, one or more specified value(s) '@_' is/are not allowed.");
2424              
2425             # Push the list
2426 0         0 push( @{ $self->{tmp_TestPkg}{m3} }, @_ );
  0         0  
2427             }
2428              
2429             sub push_m4 {
2430 0     0 1 0 my $self = shift;
2431              
2432             # Check if isas/refs/rxs/values are allowed
2433 0 0       0 &_value_is_allowed( 'm4', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m4, one or more specified value(s) '@_' is/are not allowed.");
2434              
2435             # Push the list
2436 0         0 push( @{ $self->{tmp_TestPkg}{m4} }, @_ );
  0         0  
2437             }
2438              
2439             sub push_m5 {
2440 0     0 1 0 my $self = shift;
2441              
2442             # Check if isas/refs/rxs/values are allowed
2443 0 0       0 &_value_is_allowed( 'm5', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m5, one or more specified value(s) '@_' is/are not allowed.");
2444              
2445             # Push the list
2446 0         0 push( @{ $self->{tmp_TestPkg}{m5} }, @_ );
  0         0  
2447             }
2448              
2449             sub push_m6 {
2450 0     0 1 0 my $self = shift;
2451              
2452             # Check if isas/refs/rxs/values are allowed
2453 0 0       0 &_value_is_allowed( 'm6', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m6, one or more specified value(s) '@_' is/are not allowed.");
2454              
2455             # Push the list
2456 0         0 push( @{ $self->{tmp_TestPkg}{m6} }, @_ );
  0         0  
2457             }
2458              
2459             sub push_m7 {
2460 0     0 1 0 my $self = shift;
2461              
2462             # Check if isas/refs/rxs/values are allowed
2463 0 0       0 &_value_is_allowed( 'm7', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m7, one or more specified value(s) '@_' is/are not allowed.");
2464              
2465             # Push the list
2466 0         0 push( @{ $self->{tmp_TestPkg}{m7} }, @_ );
  0         0  
2467             }
2468              
2469             sub push_m9 {
2470 0     0 1 0 my $self = shift;
2471              
2472             # Check if isas/refs/rxs/values are allowed
2473 0 0       0 &_value_is_allowed( 'm9', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::push_m9, one or more specified value(s) '@_' is/are not allowed.");
2474              
2475             # Push values
2476 0         0 foreach my $val (@_) {
2477 0 0       0 next if ( exists( $self->{tmp_TestPkg}{m9}{HASH}{$val} ) );
2478 0         0 push( @{ $self->{tmp_TestPkg}{m9}{ARRAY} }, $val );
  0         0  
2479 0         0 $self->{tmp_TestPkg}{m9}{HASH}{$val} = $val;
2480             }
2481             }
2482              
2483             sub set_b1 {
2484 0     0 1 0 my $self = shift;
2485              
2486 0 0       0 if (shift) {
2487 0         0 $self->{tmp_TestPkg}{b1} = 1;
2488             }
2489             else {
2490 0         0 $self->{tmp_TestPkg}{b1} = 0;
2491             }
2492             }
2493              
2494             sub set_b2 {
2495 4     4 1 5 my $self = shift;
2496              
2497 4 50       8 if (shift) {
2498 4         16 $self->{tmp_TestPkg}{b2} = 1;
2499             }
2500             else {
2501 0         0 $self->{tmp_TestPkg}{b2} = 0;
2502             }
2503             }
2504              
2505             sub set_b3 {
2506 3     3 1 4 my $self = shift;
2507              
2508 3 50       9 if (shift) {
2509 3         7 $self->{tmp_TestPkg}{b3} = 1;
2510             }
2511             else {
2512 0         0 $self->{tmp_TestPkg}{b3} = 0;
2513             }
2514             }
2515              
2516             sub set_b4 {
2517 2     2 1 2 my $self = shift;
2518              
2519 2 50       5 if (shift) {
2520 0         0 $self->{tmp_TestPkg}{b4} = 1;
2521             }
2522             else {
2523 2         5 $self->{tmp_TestPkg}{b4} = 0;
2524             }
2525             }
2526              
2527             sub set_idx_m1 {
2528 0     0 1 0 my $self = shift;
2529 0         0 my $idx = shift;
2530 0         0 my $val = shift;
2531              
2532             # Check if index is a positive integer or zero
2533 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m1, the specified index '$idx' is not an integer.");
2534 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m1, the specified index '$idx' is not a positive integer or zero.");
2535              
2536             # Check if isas/refs/rxs/values are allowed
2537 0 0       0 &_value_is_allowed( 'm1', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m1, one or more specified value(s) '@_' is/are not allowed.");
2538              
2539             # Set the value in the list
2540 0         0 $self->{tmp_TestPkg}{m1}[$idx] = $val;
2541             }
2542              
2543             sub set_idx_m2 {
2544 0     0 1 0 my $self = shift;
2545 0         0 my $idx = shift;
2546 0         0 my $val = shift;
2547              
2548             # Check if index is a positive integer or zero
2549 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m2, the specified index '$idx' is not an integer.");
2550 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m2, the specified index '$idx' is not a positive integer or zero.");
2551              
2552             # Check if isas/refs/rxs/values are allowed
2553 0 0       0 &_value_is_allowed( 'm2', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m2, one or more specified value(s) '@_' is/are not allowed.");
2554              
2555             # Set the value in the list
2556 0         0 $self->{tmp_TestPkg}{m2}[$idx] = $val;
2557             }
2558              
2559             sub set_idx_m3 {
2560 0     0 1 0 my $self = shift;
2561 0         0 my $idx = shift;
2562 0         0 my $val = shift;
2563              
2564             # Check if index is a positive integer or zero
2565 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m3, the specified index '$idx' is not an integer.");
2566 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m3, the specified index '$idx' is not a positive integer or zero.");
2567              
2568             # Check if isas/refs/rxs/values are allowed
2569 0 0       0 &_value_is_allowed( 'm3', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m3, one or more specified value(s) '@_' is/are not allowed.");
2570              
2571             # Set the value in the list
2572 0         0 $self->{tmp_TestPkg}{m3}[$idx] = $val;
2573             }
2574              
2575             sub set_idx_m4 {
2576 0     0 1 0 my $self = shift;
2577 0         0 my $idx = shift;
2578 0         0 my $val = shift;
2579              
2580             # Check if index is a positive integer or zero
2581 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m4, the specified index '$idx' is not an integer.");
2582 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m4, the specified index '$idx' is not a positive integer or zero.");
2583              
2584             # Check if isas/refs/rxs/values are allowed
2585 0 0       0 &_value_is_allowed( 'm4', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m4, one or more specified value(s) '@_' is/are not allowed.");
2586              
2587             # Set the value in the list
2588 0         0 $self->{tmp_TestPkg}{m4}[$idx] = $val;
2589             }
2590              
2591             sub set_idx_m5 {
2592 0     0 1 0 my $self = shift;
2593 0         0 my $idx = shift;
2594 0         0 my $val = shift;
2595              
2596             # Check if index is a positive integer or zero
2597 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m5, the specified index '$idx' is not an integer.");
2598 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m5, the specified index '$idx' is not a positive integer or zero.");
2599              
2600             # Check if isas/refs/rxs/values are allowed
2601 0 0       0 &_value_is_allowed( 'm5', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m5, one or more specified value(s) '@_' is/are not allowed.");
2602              
2603             # Set the value in the list
2604 0         0 $self->{tmp_TestPkg}{m5}[$idx] = $val;
2605             }
2606              
2607             sub set_idx_m6 {
2608 0     0 1 0 my $self = shift;
2609 0         0 my $idx = shift;
2610 0         0 my $val = shift;
2611              
2612             # Check if index is a positive integer or zero
2613 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m6, the specified index '$idx' is not an integer.");
2614 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m6, the specified index '$idx' is not a positive integer or zero.");
2615              
2616             # Check if isas/refs/rxs/values are allowed
2617 0 0       0 &_value_is_allowed( 'm6', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m6, one or more specified value(s) '@_' is/are not allowed.");
2618              
2619             # Set the value in the list
2620 0         0 $self->{tmp_TestPkg}{m6}[$idx] = $val;
2621             }
2622              
2623             sub set_idx_m7 {
2624 0     0 1 0 my $self = shift;
2625 0         0 my $idx = shift;
2626 0         0 my $val = shift;
2627              
2628             # Check if index is a positive integer or zero
2629 0 0       0 ( $idx == int($idx) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m7, the specified index '$idx' is not an integer.");
2630 0 0       0 ( $idx >= 0 ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m7, the specified index '$idx' is not a positive integer or zero.");
2631              
2632             # Check if isas/refs/rxs/values are allowed
2633 0 0       0 &_value_is_allowed( 'm7', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_idx_m7, one or more specified value(s) '@_' is/are not allowed.");
2634              
2635             # Set the value in the list
2636 0         0 $self->{tmp_TestPkg}{m7}[$idx] = $val;
2637             }
2638              
2639             sub set_m1 {
2640 2     2 1 4 my $self = shift;
2641              
2642             # Check if isas/refs/rxs/values are allowed
2643 2 50       5 &_value_is_allowed( 'm1', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m1, one or more specified value(s) '@_' is/are not allowed.");
2644              
2645             # Set the list
2646 2         3 @{ $self->{tmp_TestPkg}{m1} } = @_;
  2         7  
2647             }
2648              
2649             sub set_m10 {
2650 2     2 1 4 my $self = shift;
2651              
2652             # List value for 'm10' is not allowed to be empty
2653 2 50       6 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m10, list value may not be empty.");
2654              
2655             # Separate keys/values
2656 2         4 my @key = ();
2657 2         3 my @value = ();
2658 2         32 while ( my $key = shift(@_) ) {
2659 2         4 push( @key, $key );
2660 2         6 push( @value, shift(@_) );
2661             }
2662              
2663             # Check if isas/refs/rxs/values are allowed
2664 2 50       5 &_value_is_allowed( 'm10', @value ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m10, one or more specified value(s) '@value' is/are not allowed.");
2665              
2666             # Empty list
2667 2         5 $self->{tmp_TestPkg}{m10} = {};
2668              
2669             # Add keys/values
2670 2         4 foreach my $key (@key) {
2671 2         14 $self->{tmp_TestPkg}{m10}{$key} = shift(@value);
2672             }
2673             }
2674              
2675             sub set_m2 {
2676 2     2 1 4 my $self = shift;
2677              
2678             # List value for 'm2' is not allowed to be empty
2679 2 50       4 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m2, list value may not be empty.");
2680              
2681             # Check if isas/refs/rxs/values are allowed
2682 2 50       5 &_value_is_allowed( 'm2', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m2, one or more specified value(s) '@_' is/are not allowed.");
2683              
2684             # Set the list
2685 2         5 @{ $self->{tmp_TestPkg}{m2} } = @_;
  2         7  
2686             }
2687              
2688             sub set_m3 {
2689 2     2 1 3 my $self = shift;
2690              
2691             # List value for 'm3' is not allowed to be empty
2692 2 50       5 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m3, list value may not be empty.");
2693              
2694             # Check if isas/refs/rxs/values are allowed
2695 2 50       3 &_value_is_allowed( 'm3', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m3, one or more specified value(s) '@_' is/are not allowed.");
2696              
2697             # Set the list
2698 2         4 @{ $self->{tmp_TestPkg}{m3} } = @_;
  2         7  
2699             }
2700              
2701             sub set_m4 {
2702 2     2 1 3 my $self = shift;
2703              
2704             # List value for 'm4' is not allowed to be empty
2705 2 50       11 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m4, list value may not be empty.");
2706              
2707             # Check if isas/refs/rxs/values are allowed
2708 2 50       4 &_value_is_allowed( 'm4', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m4, one or more specified value(s) '@_' is/are not allowed.");
2709              
2710             # Set the list
2711 2         4 @{ $self->{tmp_TestPkg}{m4} } = @_;
  2         8  
2712             }
2713              
2714             sub set_m5 {
2715 2     2 1 3 my $self = shift;
2716              
2717             # List value for 'm5' is not allowed to be empty
2718 2 50       6 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m5, list value may not be empty.");
2719              
2720             # Check if isas/refs/rxs/values are allowed
2721 2 50       5 &_value_is_allowed( 'm5', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m5, one or more specified value(s) '@_' is/are not allowed.");
2722              
2723             # Set the list
2724 2         3 @{ $self->{tmp_TestPkg}{m5} } = @_;
  2         7  
2725             }
2726              
2727             sub set_m6 {
2728 2     2 1 3 my $self = shift;
2729              
2730             # List value for 'm6' is not allowed to be empty
2731 2 50       5 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m6, list value may not be empty.");
2732              
2733             # Check if isas/refs/rxs/values are allowed
2734 2 50       4 &_value_is_allowed( 'm6', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m6, one or more specified value(s) '@_' is/are not allowed.");
2735              
2736             # Set the list
2737 2         3 @{ $self->{tmp_TestPkg}{m6} } = @_;
  2         7  
2738             }
2739              
2740             sub set_m7 {
2741 2     2 1 3 my $self = shift;
2742              
2743             # List value for 'm7' is not allowed to be empty
2744 2 50       5 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m7, list value may not be empty.");
2745              
2746             # Check if isas/refs/rxs/values are allowed
2747 2 50       5 &_value_is_allowed( 'm7', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m7, one or more specified value(s) '@_' is/are not allowed.");
2748              
2749             # Set the list
2750 2         3 @{ $self->{tmp_TestPkg}{m7} } = @_;
  2         7  
2751             }
2752              
2753             sub set_m8 {
2754 2     2 1 3 my $self = shift;
2755              
2756             # List value for 'm8' is not allowed to be empty
2757 2 50       4 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m8, list value may not be empty.");
2758              
2759             # Check if isas/refs/rxs/values are allowed
2760 2 50       5 &_value_is_allowed( 'm8', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m8, one or more specified value(s) '@_' is/are not allowed.");
2761              
2762             # Empty list
2763 2         5 $self->{tmp_TestPkg}{m8} = {};
2764              
2765             # Add values
2766 2         4 foreach my $val (@_) {
2767 2         9 $self->{tmp_TestPkg}{m8}{$val} = $val;
2768             }
2769             }
2770              
2771             sub set_m9 {
2772 2     2 1 2 my $self = shift;
2773              
2774             # List value for 'm9' is not allowed to be empty
2775 2 50       15 scalar(@_) || throw Error::Simple("ERROR: tmp::TestPkg::set_m9, list value may not be empty.");
2776              
2777             # Check if isas/refs/rxs/values are allowed
2778 2 50       3 &_value_is_allowed( 'm9', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::set_m9, one or more specified value(s) '@_' is/are not allowed.");
2779              
2780             # Empty list
2781 2         7 $self->{tmp_TestPkg}{m9}{ARRAY} = [];
2782 2         5 $self->{tmp_TestPkg}{m9}{HASH} = {};
2783              
2784             # Push values
2785 2         5 foreach my $val (@_) {
2786 2 50       6 next if ( exists( $self->{tmp_TestPkg}{m9}{HASH}{$val} ) );
2787 2         3 push( @{ $self->{tmp_TestPkg}{m9}{ARRAY} }, $val );
  2         5  
2788 2         9 $self->{tmp_TestPkg}{m9}{HASH}{$val} = $val;
2789             }
2790             }
2791              
2792             sub set_num_m1 {
2793 0     0 1 0 my $self = shift;
2794 0         0 my $num = shift;
2795              
2796             # Check if index is an integer
2797 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m1, the specified number '$num' is not an integer.");
2798              
2799             # Call set_idx_m1
2800 0         0 $self->set_idx_m1( $num - 1, @_ );
2801             }
2802              
2803             sub set_num_m2 {
2804 0     0 1 0 my $self = shift;
2805 0         0 my $num = shift;
2806              
2807             # Check if index is an integer
2808 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m2, the specified number '$num' is not an integer.");
2809              
2810             # Call set_idx_m2
2811 0         0 $self->set_idx_m2( $num - 1, @_ );
2812             }
2813              
2814             sub set_num_m3 {
2815 0     0 1 0 my $self = shift;
2816 0         0 my $num = shift;
2817              
2818             # Check if index is an integer
2819 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m3, the specified number '$num' is not an integer.");
2820              
2821             # Call set_idx_m3
2822 0         0 $self->set_idx_m3( $num - 1, @_ );
2823             }
2824              
2825             sub set_num_m4 {
2826 0     0 1 0 my $self = shift;
2827 0         0 my $num = shift;
2828              
2829             # Check if index is an integer
2830 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m4, the specified number '$num' is not an integer.");
2831              
2832             # Call set_idx_m4
2833 0         0 $self->set_idx_m4( $num - 1, @_ );
2834             }
2835              
2836             sub set_num_m5 {
2837 0     0 1 0 my $self = shift;
2838 0         0 my $num = shift;
2839              
2840             # Check if index is an integer
2841 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m5, the specified number '$num' is not an integer.");
2842              
2843             # Call set_idx_m5
2844 0         0 $self->set_idx_m5( $num - 1, @_ );
2845             }
2846              
2847             sub set_num_m6 {
2848 0     0 1 0 my $self = shift;
2849 0         0 my $num = shift;
2850              
2851             # Check if index is an integer
2852 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m6, the specified number '$num' is not an integer.");
2853              
2854             # Call set_idx_m6
2855 0         0 $self->set_idx_m6( $num - 1, @_ );
2856             }
2857              
2858             sub set_num_m7 {
2859 0     0 1 0 my $self = shift;
2860 0         0 my $num = shift;
2861              
2862             # Check if index is an integer
2863 0 0       0 ( $num == int($num) ) || throw Error::Simple("ERROR: tmp::TestPkg::set_num_m7, the specified number '$num' is not an integer.");
2864              
2865             # Call set_idx_m7
2866 0         0 $self->set_idx_m7( $num - 1, @_ );
2867             }
2868              
2869             sub set_s1 {
2870 0     0 1 0 my $self = shift;
2871 0         0 my $val = shift;
2872              
2873             # Check if isa/ref/rx/value is allowed
2874 0 0       0 &_value_is_allowed( 's1', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_s1, the specified value '$val' is not allowed.");
2875              
2876             # Assignment
2877 0         0 $self->{tmp_TestPkg}{s1} = $val;
2878             }
2879              
2880             sub set_s2 {
2881 0     0 1 0 my $self = shift;
2882 0         0 my $val = shift;
2883              
2884             # Value for 's2' is not allowed to be empty
2885 0 0       0 defined($val) || throw Error::Simple("ERROR: tmp::TestPkg::set_s2, value may not be empty.");
2886              
2887             # Check if isa/ref/rx/value is allowed
2888 0 0       0 &_value_is_allowed( 's2', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_s2, the specified value '$val' is not allowed.");
2889              
2890             # Assignment
2891 0         0 $self->{tmp_TestPkg}{s2} = $val;
2892             }
2893              
2894             sub set_s3 {
2895 0     0 1 0 my $self = shift;
2896 0         0 my $val = shift;
2897              
2898             # Value for 's3' is not allowed to be empty
2899 0 0       0 defined($val) || throw Error::Simple("ERROR: tmp::TestPkg::set_s3, value may not be empty.");
2900              
2901             # Check if isa/ref/rx/value is allowed
2902 0 0       0 &_value_is_allowed( 's3', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_s3, the specified value '$val' is not allowed.");
2903              
2904             # Assignment
2905 0         0 $self->{tmp_TestPkg}{s3} = $val;
2906             }
2907              
2908             sub set_s4 {
2909 0     0 1 0 my $self = shift;
2910 0         0 my $val = shift;
2911              
2912             # Value for 's4' is not allowed to be empty
2913 0 0       0 defined($val) || throw Error::Simple("ERROR: tmp::TestPkg::set_s4, value may not be empty.");
2914              
2915             # Check if isa/ref/rx/value is allowed
2916 0 0       0 &_value_is_allowed( 's4', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_s4, the specified value '$val' is not allowed.");
2917              
2918             # Assignment
2919 0         0 $self->{tmp_TestPkg}{s4} = $val;
2920             }
2921              
2922             sub set_s5 {
2923 0     0 1 0 my $self = shift;
2924 0         0 my $val = shift;
2925              
2926             # Value for 's5' is not allowed to be empty
2927 0 0       0 defined($val) || throw Error::Simple("ERROR: tmp::TestPkg::set_s5, value may not be empty.");
2928              
2929             # Check if isa/ref/rx/value is allowed
2930 0 0       0 &_value_is_allowed( 's5', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_s5, the specified value '$val' is not allowed.");
2931              
2932             # Assignment
2933 0         0 $self->{tmp_TestPkg}{s5} = $val;
2934             }
2935              
2936             sub set_s6 {
2937 2     2 1 3 my $self = shift;
2938 2         9 my $val = shift;
2939              
2940             # Value for 's6' is not allowed to be empty
2941 2 50       4 defined($val) || throw Error::Simple("ERROR: tmp::TestPkg::set_s6, value may not be empty.");
2942              
2943             # Check if isa/ref/rx/value is allowed
2944 2 50       5 &_value_is_allowed( 's6', $val ) || throw Error::Simple("ERROR: tmp::TestPkg::set_s6, the specified value '$val' is not allowed.");
2945              
2946             # Assignment
2947 2         5 $self->{tmp_TestPkg}{s6} = $val;
2948             }
2949              
2950             sub shift_m1 {
2951 0     0 1   my $self = shift;
2952              
2953             # Shift an element from the list
2954 0           return( shift( @{ $self->{tmp_TestPkg}{m1} } ) );
  0            
2955             }
2956              
2957             sub shift_m2 {
2958 0     0 1   my $self = shift;
2959              
2960             # List value for 'm2' is not allowed to be empty
2961 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m2, list value may not be empty.");
2962              
2963             # Shift an element from the list
2964 0           return( shift( @{ $self->{tmp_TestPkg}{m2} } ) );
  0            
2965             }
2966              
2967             sub shift_m3 {
2968 0     0 1   my $self = shift;
2969              
2970             # List value for 'm3' is not allowed to be empty
2971 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m3, list value may not be empty.");
2972              
2973             # Shift an element from the list
2974 0           return( shift( @{ $self->{tmp_TestPkg}{m3} } ) );
  0            
2975             }
2976              
2977             sub shift_m4 {
2978 0     0 1   my $self = shift;
2979              
2980             # List value for 'm4' is not allowed to be empty
2981 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m4, list value may not be empty.");
2982              
2983             # Shift an element from the list
2984 0           return( shift( @{ $self->{tmp_TestPkg}{m4} } ) );
  0            
2985             }
2986              
2987             sub shift_m5 {
2988 0     0 1   my $self = shift;
2989              
2990             # List value for 'm5' is not allowed to be empty
2991 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m5, list value may not be empty.");
2992              
2993             # Shift an element from the list
2994 0           return( shift( @{ $self->{tmp_TestPkg}{m5} } ) );
  0            
2995             }
2996              
2997             sub shift_m6 {
2998 0     0 1   my $self = shift;
2999              
3000             # List value for 'm6' is not allowed to be empty
3001 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m6, list value may not be empty.");
3002              
3003             # Shift an element from the list
3004 0           return( shift( @{ $self->{tmp_TestPkg}{m6} } ) );
  0            
3005             }
3006              
3007             sub shift_m7 {
3008 0     0 1   my $self = shift;
3009              
3010             # List value for 'm7' is not allowed to be empty
3011 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m7, list value may not be empty.");
3012              
3013             # Shift an element from the list
3014 0           return( shift( @{ $self->{tmp_TestPkg}{m7} } ) );
  0            
3015             }
3016              
3017             sub shift_m9 {
3018 0     0 1   my $self = shift;
3019              
3020             # List value for 'm9' is not allowed to be empty
3021 0 0         ( scalar(@_) > 1 ) || throw Error::Simple("ERROR: tmp::TestPkg::shift_m9, list value may not be empty.");
3022              
3023             # Shift value
3024 0           my $val = shift( @{ $self->{tmp_TestPkg}{m9}{ARRAY} } );
  0            
3025 0           delete( $self->{tmp_TestPkg}{m9}{HASH}{$val} );
3026 0           return($val);
3027             }
3028              
3029             sub unshift_m1 {
3030 0     0 1   my $self = shift;
3031              
3032             # Check if isas/refs/rxs/values are allowed
3033 0 0         &_value_is_allowed( 'm1', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m1, one or more specified value(s) '@_' is/are not allowed.");
3034              
3035             # Unshift the list
3036 0           unshift( @{ $self->{tmp_TestPkg}{m1} }, @_ );
  0            
3037             }
3038              
3039             sub unshift_m2 {
3040 0     0 1   my $self = shift;
3041              
3042             # Check if isas/refs/rxs/values are allowed
3043 0 0         &_value_is_allowed( 'm2', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m2, one or more specified value(s) '@_' is/are not allowed.");
3044              
3045             # Unshift the list
3046 0           unshift( @{ $self->{tmp_TestPkg}{m2} }, @_ );
  0            
3047             }
3048              
3049             sub unshift_m3 {
3050 0     0 1   my $self = shift;
3051              
3052             # Check if isas/refs/rxs/values are allowed
3053 0 0         &_value_is_allowed( 'm3', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m3, one or more specified value(s) '@_' is/are not allowed.");
3054              
3055             # Unshift the list
3056 0           unshift( @{ $self->{tmp_TestPkg}{m3} }, @_ );
  0            
3057             }
3058              
3059             sub unshift_m4 {
3060 0     0 1   my $self = shift;
3061              
3062             # Check if isas/refs/rxs/values are allowed
3063 0 0         &_value_is_allowed( 'm4', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m4, one or more specified value(s) '@_' is/are not allowed.");
3064              
3065             # Unshift the list
3066 0           unshift( @{ $self->{tmp_TestPkg}{m4} }, @_ );
  0            
3067             }
3068              
3069             sub unshift_m5 {
3070 0     0 1   my $self = shift;
3071              
3072             # Check if isas/refs/rxs/values are allowed
3073 0 0         &_value_is_allowed( 'm5', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m5, one or more specified value(s) '@_' is/are not allowed.");
3074              
3075             # Unshift the list
3076 0           unshift( @{ $self->{tmp_TestPkg}{m5} }, @_ );
  0            
3077             }
3078              
3079             sub unshift_m6 {
3080 0     0 1   my $self = shift;
3081              
3082             # Check if isas/refs/rxs/values are allowed
3083 0 0         &_value_is_allowed( 'm6', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m6, one or more specified value(s) '@_' is/are not allowed.");
3084              
3085             # Unshift the list
3086 0           unshift( @{ $self->{tmp_TestPkg}{m6} }, @_ );
  0            
3087             }
3088              
3089             sub unshift_m7 {
3090 0     0 1   my $self = shift;
3091              
3092             # Check if isas/refs/rxs/values are allowed
3093 0 0         &_value_is_allowed( 'm7', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m7, one or more specified value(s) '@_' is/are not allowed.");
3094              
3095             # Unshift the list
3096 0           unshift( @{ $self->{tmp_TestPkg}{m7} }, @_ );
  0            
3097             }
3098              
3099             sub unshift_m9 {
3100 0     0 1   my $self = shift;
3101              
3102             # Check if isas/refs/rxs/values are allowed
3103 0 0         &_value_is_allowed( 'm9', @_ ) || throw Error::Simple("ERROR: tmp::TestPkg::unshift_m9, one or more specified value(s) '@_' is/are not allowed.");
3104              
3105             # Unshift values
3106 0           foreach my $val ( reverse(@_) ) {
3107 0 0         next if ( exists( $self->{tmp_TestPkg}{m9}{HASH}{$val} ) );
3108 0           unshift( @{ $self->{tmp_TestPkg}{m9}{ARRAY} }, $val );
  0            
3109 0           $self->{tmp_TestPkg}{m9}{HASH}{$val} = $val;
3110             }
3111             }
3112              
3113             sub values_m10 {
3114 0     0 1   my $self = shift;
3115              
3116 0 0         if ( scalar(@_) ) {
3117 0           my @ret = ();
3118 0           foreach my $key (@_) {
3119 0 0         exists( $self->{tmp_TestPkg}{m10}{$key} ) && push( @ret, $self->{tmp_TestPkg}{m10}{$key} );
3120             }
3121 0           return(@ret);
3122             }
3123             else {
3124             # Return all values
3125 0           return( values( %{ $self->{tmp_TestPkg}{m10} } ) );
  0            
3126             }
3127             }
3128              
3129             sub values_m8 {
3130 0     0 1   my $self = shift;
3131              
3132             # Return all values
3133 0           return( values( %{ $self->{tmp_TestPkg}{m8} } ) );
  0            
3134             }
3135              
3136             1;