LIVR/Rules/Collection.pm

filter: Statementstmt 100% 129 / 129 Branchbran 97.0% 97 / 100 Conditioncond 94.5% 70 / 74 MC/DCmcdc 88.6% 39 / 44 Subroutinesub 100% 16 / 16 Podpod 0.0% 0 / 5 totaltotal 95.3% 351 / 368 CC 82 SCAR 24.1
CC
82
Cov
98%
list_length
19.0
__ANON__
17.1
__ANON__
12.0
CRAP 11.1
« LIVR/Rules/DateTime.pm ↑ Summary LIVR/Rules/Special.pm »
1 package Validator::LIVR::Rules::Collection;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Validator::LIVR::Rules::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '2.22';
9  
10 # LIVR 2.5: rules for hashes and lists. The builders of values, keys and split are livr_values,
11 # livr_keys and livr_split, as Perl has functions with these names
12  
13 # The fields next to a value of "values" or a key of "keys": none. They have no containing
14 # object, so equal_to_field and the references of required_if and when see a missing value there
15 2 my $NO_FIELDS = {};
16  
17 54 ▶sub livr_values {
Subroutine livr_values: called CC=1 SCAR=0.0
Pod undocumented
18 54 my ( $rules, $rule_builders ) = _rules_argument( 'values', @_ );
19 47 my $value_rule = Validator::LIVR->_new_with_rules( { field => $rules }, $rule_builders )->_field_rule('field');
20  
21 40 ▶ return sub {
Subroutine __ANON__: called CC=7 SCAR=19.5
22 40 my ( $object, undef, $output_ref ) = @_;
23 40 ▶ return if !defined($object) || $object eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $object or $object eq "" 10 30 40
Condition100%3/3
not defined $object or $object eq ""
l!l&&r!l&&!r
6430
MC/DC100%2/2
not defined $object or $object eq ""
not defined $object $object eq ""
Truth table100%3/3
not(A) or B
A= not defined $objectB= $object eq ""
ABresult
1X1
011
000
24 30 ▶ return 'FORMAT_ERROR' if ref($object) ne 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $object ne "HASH" 5 25 30
25  
26 25 my ( %result, %errors );
27  
28 25 foreach my $key ( keys %$object ) {
29 48 my $value = $object->{$key};
30 48 my $output = $value;
31  
32 48 ▶ if ( my $err_code = $value_rule->( $value, $NO_FIELDS, \$output ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $err_code = &$value_rule($value, $NO_FIELDS, \$output)) { } 15 33 48
33 15 $errors{$key} = $err_code;
34 } else {
35 33 $result{$key} = $output;
36 }
37 }
38  
39 25 ▶ return \%errors if %errors;
Branch: 1 branch
BranchTrueFalseTotal
if %errors 10 15 25
40  
41 15 $$output_ref = \%result;
42 15 return;
43 46 };
44 }
45  
46 32 ▶sub livr_keys {
Subroutine livr_keys: called CC=1 SCAR=0.0
Pod undocumented
47 32 my ( $rules, $rule_builders ) = _rules_argument( 'keys', @_ );
48  
49 # Keys are checked as they are, without auto trim
50 26 my $key_rule = Validator::LIVR->_new_with_rules( { field => $rules }, $rule_builders, 0 )->_field_rule('field');
51  
52 25 ▶ return sub {
Subroutine __ANON__: called CC=7 SCAR=19.5
53 25 my $object = shift;
54 25 ▶ return if !defined($object) || $object eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $object or $object eq "" 5 20 25
Condition100%3/3
not defined $object or $object eq ""
l!l&&r!l&&!r
3220
MC/DC100%2/2
not defined $object or $object eq ""
not defined $object $object eq ""
Truth table100%3/3
not(A) or B
A= not defined $objectB= $object eq ""
ABresult
1X1
011
000
55 20 ▶ return 'FORMAT_ERROR' if ref($object) ne 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $object ne "HASH" 4 16 20
56  
57 # The rules only check: their output is ignored and the hash stays unchanged
58 16 my %errors;
59 16 foreach my $key ( keys %$object ) {
60 27 my $output = $key;
61 27 ▶ $errors{$key} = 'WRONG_KEY' if $key_rule->( $key, $NO_FIELDS, \$output );
Branch: 1 branch
BranchTrueFalseTotal
if &$key_rule($key, $NO_FIELDS, \$output) 7 20 27
62 }
63  
64 16 ▶ return \%errors if %errors;
Branch: 1 branch
BranchTrueFalseTotal
if %errors 6 10 16
65 10 return;
66 25 };
67 }
68  
69 # The arguments of values and keys are the same as in list_of: values('string'),
70 # values('required', 'string') or values(['required', 'string'])
71 86 ▶sub _rules_argument {
Subroutine _rules_argument: called CC=6 SCAR=17.9
72 86 my ( $rule_name, @args ) = @_;
73 86 my $rule_builders = pop @args;
74  
75 86 ▶ my $rules = @args == 1 && ref( $args[0] ) eq 'ARRAY' ? $args[0] : \@args;
Branch: 1 branch
BranchTrueFalseTotal
@args == 1 && ref $args[0] eq 'ARRAY' ? : 6 80 86
Condition100%3/3
@args == 1 and ref $args[0] eq "ARRAY"
!ll&&!rl&&r
37436
MC/DC100%2/2
@args == 1 and ref $args[0] eq "ARRAY"
@args == 1 ref $args[0] eq "ARRAY"
Truth table100%3/3
A and B
A= @args == 1B= ref $args[0] eq "ARRAY"
ABresult
0X0
100
111
76 86 ▶ die "Rule [$rule_name] needs rules\n" if !@$rules;
Branch: 1 branch
BranchTrueFalseTotal
unless @$rules 6 80 86
77  
78 # { values => undef }: null in place of rules, not in a list of rules
79 80 ▶ Validator::LIVR::Rules::Types::check_rule_set( $rule_name, @args == 1 && !defined( $args[0] ) ? undef : $rules );
Branch: 1 branch
BranchTrueFalseTotal
@args == 1 && !defined($args[0]) ? : 4 76 80
Condition100%3/3
@args == 1 and not defined $args[0]
!ll&&!rl&&r
33434
MC/DC100%2/2
@args == 1 and not defined $args[0]
@args == 1 not defined $args[0]
Truth table100%3/3
A and not(B)
A= @args == 1B= not defined $args[0]
ABresult
0X0
100
111
80  
81 73 return ( $rules, $rule_builders );
82 }
83  
84 # list_length($length), list_length($min, $max), list_length({ min => $min, max => $max })
85 59 ▶sub list_length {
Subroutine list_length: called CC=19 SCAR=29.4
Pod undocumented
86 59 my @args = @_;
87 59 pop @args; # rule_builders
88  
89 59 my ( $min, $max );
90  
91 # Arguments after the options object, or after "max", are ignored
92 59 ▶ if ( @args && ref( $args[0] ) eq 'HASH' ) {
Branch: 3 branches
BranchTrueFalseTotal
if (@args and ref $args[0] eq 'HASH') { } 15 44 59
elsif (@args == 1 and _is_length($args[0])) { } 19 25 44
elsif (@args >= 2 and _is_length($args[0]) and _is_length($args[1])) { } 19 6 25
Condition100%3/3
@args and ref $args[0] eq "HASH"
!ll&&!rl&&r
14315
MC/DC100%2/2
@args and ref $args[0] eq "HASH"
@args ref $args[0] eq "HASH"
Truth table100%3/3
A and B
A= @argsB= ref $args[0] eq "HASH"
ABresult
0X0
100
111
93 15 my $options = $args[0];
94  
95 15 foreach my $name ( sort keys %$options ) {
96 18 ▶ die qq{Rule [list_length] got an unknown option "$name"\n} if $name ne 'min' && $name ne 'max';
Branch: 1 branch
BranchTrueFalseTotal
if $name ne "min" and $name ne "max" 1 17 18
Condition100%3/3
$name ne "min" and $name ne "max"
!ll&&!rl&&r
891
MC/DC100%2/2
$name ne "min" and $name ne "max"
$name ne "min" $name ne "max"
Truth table100%3/3
A and B
A= $name ne "min"B= $name ne "max"
ABresult
0X0
100
111
97 }
98  
99 14 ▶ die qq{Rule [list_length] takes "min", "max" or both\n} if !%$options;
Branch: 1 branch
BranchTrueFalseTotal
unless %$options 1 13 14
100  
101 13 ▶ ( $min, $max ) = ( $options->{min} // 0, $options->{max} );
Condition100%2/2
$options->{"min"} // 0
l!l
76
MC/DC100%1/1
$options->{"min"} // 0
$options->{"min"}
Truth table100%2/2
A
A= $options->{"min"}
Aresult
11
00
102 13 ▶ if ( ( exists $options->{min} && !_is_length( $options->{min} ) )
Branch: 1 branch
BranchTrueFalseTotal
if (exists $options->{"min"} and not _is_length($options->{"min"}) or exists $options->{"max"} and not _is_length($options->{"max"})) 2 11 13
Condition100%9/9
exists $options->{"min"} and not _is_length($options->{"min"}) or exists $options->{"max"} and not _is_length($options->{"max"})
l!l&&r!l&&!r
1111
exists $options->{"min"} and not _is_length($options->{"min"})
!ll&&!rl&&r
571
exists $options->{"max"} and not _is_length($options->{"max"})
!ll&&!rl&&r
381
MC/DC75%3/4
exists $options->{"min"} and not _is_length($options->{"min"}) or exists $options->{"max"} and not _is_length($options->{"max"})
exists $options->{"min"} not _is_length($options->{"min"}) exists $options->{"max"} not _is_length($options->{"max"})
Truth table71%5/7
A and not(B) or C and not(D)
A= exists $options->{"min"}B= not _is_length($options->{"min"})C= exists $options->{"max"}D= not _is_length($options->{"max"})
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
103 || ( exists $options->{max} && !_is_length( $options->{max} ) ) )
104 {
105 2 die qq{Rule [list_length] takes non-negative integers as "min" and "max"\n};
106 }
107 ▶ } elsif ( @args == 1 && _is_length( $args[0] ) ) {
Condition100%3/3
@args == 1 and _is_length($args[0])
!ll&&!rl&&r
21419
MC/DC100%2/2
@args == 1 and _is_length($args[0])
@args == 1 _is_length($args[0])
Truth table100%3/3
A and B
A= @args == 1B= _is_length($args[0])
ABresult
0X0
100
111
108 19 $min = $max = $args[0];
109 ▶ } elsif ( @args >= 2 && _is_length( $args[0] ) && _is_length( $args[1] ) ) {
Condition83%5/6
@args >= 2 and _is_length($args[0]) and _is_length($args[1])
!ll&&!rl&&r
6019
@args >= 2 and _is_length($args[0])
!ll&&!rl&&r
5119
MC/DC66%2/3
@args >= 2 and _is_length($args[0]) and _is_length($args[1])
@args >= 2 _is_length($args[0]) _is_length($args[1])
Truth table75%3/4
A and B and C
A= @args >= 2B= _is_length($args[0])C= _is_length($args[1])
ABCresult
0XX0
10X0
1100
1111
110 19 ( $min, $max ) = @args;
111 } else {
112 6 die qq{Rule [list_length] takes a length, a minimum and a maximum, or an object with "min" and "max"\n};
113 }
114  
115 49 ▶ die qq{Rule [list_length] got "min" greater than "max"\n} if defined($max) && $min > $max;
Branch: 1 branch
BranchTrueFalseTotal
if defined $max and $min > $max 2 47 49
Condition100%3/3
defined $max and $min > $max
!ll&&!rl&&r
3442
MC/DC100%2/2
defined $max and $min > $max
defined $max $min > $max
Truth table100%3/3
A and B
A= defined $maxB= $min > $max
ABresult
0X0
100
111
116  
117 50 ▶ return sub {
Subroutine __ANON__: called CC=7 SCAR=19.5
118 50 my $list = shift;
119  
120 # An empty list is a value: { min => 1 } rejects it
121 50 ▶ return if !defined($list) || $list eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $list or $list eq "" 5 45 50
Condition100%3/3
not defined $list or $list eq ""
l!l&&r!l&&!r
3245
MC/DC100%2/2
not defined $list or $list eq ""
not defined $list $list eq ""
Truth table100%3/3
not(A) or B
A= not defined $listB= $list eq ""
ABresult
1X1
011
000
122 45 ▶ return 'FORMAT_ERROR' if ref($list) ne 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $list ne "ARRAY" 6 39 45
123  
124 39 ▶ return 'TOO_FEW_ITEMS' if @$list < $min;
Branch: 1 branch
BranchTrueFalseTotal
if @$list < $min 9 30 39
125 30 ▶ return 'TOO_MANY_ITEMS' if defined($max) && @$list > $max;
Branch: 1 branch
BranchTrueFalseTotal
if defined $max and @$list > $max 8 22 30
Condition100%3/3
defined $max and @$list > $max
!ll&&!rl&&r
2208
MC/DC100%2/2
defined $max and @$list > $max
defined $max @$list > $max
Truth table100%3/3
A and B
A= defined $maxB= @$list > $max
ABresult
0X0
100
111
126 22 return;
127 47 };
128 }
129  
130 79 ▶sub _is_length { Validator::LIVR::Rules::Types::is_length(@_) }
Subroutine _is_length: called CC=1 SCAR=0.0
131  
132 # unique(): primitive items, unique(@keys): hashes with unique values of the keys
133 62 ▶sub unique {
Subroutine unique: called CC=4 SCAR=13.9
Pod undocumented
134 62 my @keys = @_;
135 62 pop @keys; # rule_builders
136  
137 62 ▶ die "Rule [unique] takes key names as strings\n" if grep { !defined($_) || ref($_) } @keys;
Branch: 1 branch
BranchTrueFalseTotal
if grep {not defined $_ or ref $_;} @keys 2 60 62
Condition66%2/3
!defined($_) || ref $_
l!l&&r!l&&!r
0244
MC/DC50%1/2
!defined($_) || ref $_
!defined($_) ref $_
Truth table66%2/3
not(A) || B
A= !defined($_)B= ref $_
ABresult
1X1
011
000
138  
139 # Items are compared by their string forms, so 1 and "1" are duplicates. A wrong item
140 # is FORMAT_ERROR, wherever it is in the list
141 60 ▶ if ( !@keys ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (@keys) 31 29 60
142 31 ▶ return sub {
Subroutine __ANON__: called CC=12 SCAR=24.9
143 31 my $list = shift;
144 31 ▶ return if !defined($list) || $list eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $list or $list eq "" 5 26 31
Condition100%3/3
not defined $list or $list eq ""
l!l&&r!l&&!r
3226
MC/DC100%2/2
not defined $list or $list eq ""
not defined $list $list eq ""
Truth table100%3/3
not(A) or B
A= not defined $listB= $list eq ""
ABresult
1X1
011
000
145 26 ▶ return 'FORMAT_ERROR' if ref($list) ne 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $list ne "ARRAY" 3 23 26
146  
147 23 my ( %is_seen, $has_duplicates );
148  
149 23 foreach my $item (@$list) {
150 59 ▶ next if !defined($item) || $item eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $item or $item eq "" 5 54 59
Condition100%3/3
not defined $item or $item eq ""
l!l&&r!l&&!r
2354
MC/DC100%2/2
not defined $item or $item eq ""
not defined $item $item eq ""
Truth table100%3/3
not(A) or B
A= not defined $itemB= $item eq ""
ABresult
1X1
011
000
151  
152 54 my $string;
153 54 ▶ if ( ref($item) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $item) { } 6 48 54
154 6 ▶ return 'FORMAT_ERROR' if ref($item) !~ /Boolean/;
Branch: 1 branch
BranchTrueFalseTotal
unless ref($item) =~ /Boolean/ 4 2 6
155 2 ▶ $string = $item ? 'true' : 'false';
Branch: 1 branch
BranchTrueFalseTotal
$item ? : 2 0 2
156 } else {
157 48 $string = Validator::LIVR::Rules::Types::string_form($item);
158 }
159  
160 50 ▶ $has_duplicates = 1 if $is_seen{$string}++;
Branch: 1 branch
BranchTrueFalseTotal
if $is_seen{$string}++ 11 39 50
161 }
162  
163 19 ▶ return 'NOT_UNIQUE_ITEMS' if $has_duplicates;
Branch: 1 branch
BranchTrueFalseTotal
if $has_duplicates 9 10 19
164 10 return;
165 31 };
166 }
167  
168 29 ▶ return sub {
Subroutine __ANON__: called CC=17 SCAR=28.4
169 29 my $list = shift;
170 29 ▶ return if !defined($list) || $list eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $list or $list eq "" 0 29 29
Condition33%1/3
not defined $list or $list eq ""
l!l&&r!l&&!r
0029
MC/DC0%0/2
not defined $list or $list eq ""
not defined $list $list eq ""
Truth table33%1/3
not(A) or B
A= not defined $listB= $list eq ""
ABresult
1X1
011
000
171 29 ▶ return 'FORMAT_ERROR' if ref($list) ne 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $list ne "ARRAY" 2 27 29
172  
173 27 my ( %is_seen, $has_duplicates );
174  
175 27 ITEM: foreach my $item (@$list) {
176 62 ▶ next if !defined($item) || $item eq '';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $item or $item eq "" 4 58 62
Condition100%3/3
not defined $item or $item eq ""
l!l&&r!l&&!r
2258
MC/DC100%2/2
not defined $item or $item eq ""
not defined $item $item eq ""
Truth table100%3/3
not(A) or B
A= not defined $itemB= $item eq ""
ABresult
1X1
011
000
177 58 ▶ return 'FORMAT_ERROR' if ref($item) ne 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $item ne "HASH" 3 55 58
178  
179 # An item with an empty key value is not compared, a key value of a wrong type is an error.
180 # The string forms with their lengths, so ["a,b"] and ["a", "b"] differ
181 55 my ( $id, $has_empty_value ) = ('');
182  
183 55 foreach my $key (@keys) {
184 83 my $value = $item->{$key};
185  
186 83 ▶ if ( !defined($value) || $value eq '' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $value or $value eq "") 11 72 83
Condition100%3/3
not defined $value or $value eq ""
l!l&&r!l&&!r
6572
MC/DC100%2/2
not defined $value or $value eq ""
not defined $value $value eq ""
Truth table100%3/3
not(A) or B
A= not defined $valueB= $value eq ""
ABresult
1X1
011
000
187 11 $has_empty_value = 1;
188 11 next;
189 }
190  
191 72 my $string;
192 72 ▶ if ( ref($value) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $value) { } 10 62 72
193 10 ▶ return 'FORMAT_ERROR' if ref($value) !~ /Boolean/;
Branch: 1 branch
BranchTrueFalseTotal
unless ref($value) =~ /Boolean/ 8 2 10
194 2 ▶ $string = $value ? 'true' : 'false';
Branch: 1 branch
BranchTrueFalseTotal
$value ? : 2 0 2
195 } else {
196 62 $string = Validator::LIVR::Rules::Types::string_form($value);
197 }
198  
199 64 $id .= length($string) . ':' . $string;
200 }
201  
202 47 ▶ next ITEM if $has_empty_value;
Branch: 1 branch
BranchTrueFalseTotal
if $has_empty_value 10 37 47
203 37 ▶ $has_duplicates = 1 if $is_seen{$id}++;
Branch: 1 branch
BranchTrueFalseTotal
if $is_seen{$id}++ 6 31 37
204 }
205  
206 16 ▶ return 'NOT_UNIQUE_ITEMS' if $has_duplicates;
Branch: 1 branch
BranchTrueFalseTotal
if $has_duplicates 3 13 16
207 13 return;
208 29 };
209 }
210  
211 48 ▶sub livr_split {
Subroutine livr_split: called CC=5 SCAR=16.1
Pod undocumented
212 48 my ($separator) = @_;
213  
214 # Arguments after the separator are ignored. The last one is the rule builders
215 48 ▶ if ( @_ < 2 || !defined($separator) || ref($separator) || $separator eq '' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ < 2 or not defined $separator or ref $separator or $separator eq "") 5 43 48
Condition100%9/9
@_ < 2 or not defined $separator or ref $separator or $separator eq ""
l!l&&r!l&&!r
4143
@_ < 2 or not defined $separator or ref $separator
l!l&&r!l&&!r
3144
@_ < 2 or not defined $separator
l!l&&r!l&&!r
1245
MC/DC100%4/4
@_ < 2 or not defined $separator or ref $separator or $separator eq ""
@_ < 2 not defined $separator ref $separator $separator eq ""
Truth table100%5/5
A or not(B) or C or D
A= @_ < 2B= not defined $separatorC= ref $separatorD= $separator eq ""
ABCDresult
1XXX1
01XX1
001X1
00011
00000
216 5 die "Rule [split] takes a non-empty separator string\n";
217 }
218  
219 # A number is its string form
220 43 $separator = Validator::LIVR::Rules::Types::string_form($separator);
221 43 my $separator_re = qr/\Q$separator\E/;
222  
223 # A modifier: lists, empty values and hashes stay as they are, the next rule reports them.
224 # Numbers and booleans are split in their string form, like strings
225 44 ▶ return sub {
Subroutine __ANON__: called CC=7 SCAR=19.5
226 44 my ( $value, undef, $output_ref ) = @_;
227 44 ▶ return if !defined($value);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 4 40 44
228  
229 40 my $string;
230 40 ▶ if ( ref($value) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $value) { } 10 30 40
231 10 ▶ return if ref($value) !~ /Boolean/;
Branch: 1 branch
BranchTrueFalseTotal
unless ref($value) =~ /Boolean/ 8 2 10
232 2 ▶ $string = $value ? 'true' : 'false';
Branch: 1 branch
BranchTrueFalseTotal
$value ? : 1 1 2
233 } else {
234 30 ▶ return if $value eq '';
Branch: 1 branch
BranchTrueFalseTotal
if $value eq "" 2 28 30
235 28 $string = Validator::LIVR::Rules::Types::string_form($value);
236 }
237  
238 # At every separator, empty parts are kept: "a,,b" is [ "a", "", "b" ]
239 30 ▶ $$output_ref = index( $string, $separator ) < 0 ? [$string] : [ split $separator_re, $string, -1 ];
Branch: 1 branch
BranchTrueFalseTotal
index($string, $separator) == -1 ? : 9 21 30
240 30 return;
241 43 };
242 }
243  
244 2 1;
245  
246 =head1 NAME
247  
248 Validator::LIVR::Rules::Collection - LIVR 2.5 rules of Validator::LIVR for hashes and lists: values, keys, list_length, unique and split
249  
250 =head1 DESCRIPTION
251  
252 This module has the code of these rules, which are documented in
253 L<Validator::LIVR/LIVR 2.5 rules>. Validator::LIVR loads it when a validator
254 uses one of the rules.
255  
256 Each sub is the builder of the rule with the same name. The builders of
257 C<values>, C<keys> and C<split> are C<livr_values>, C<livr_keys> and
258 C<livr_split>, as Perl has functions with these names.
259  
260 =cut
« LIVR/Rules/DateTime.pm ↑ Summary LIVR/Rules/Special.pm »