line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package UR::BoolExpr::Template::PropertyComparison::True; |
3
|
|
|
|
|
|
|
|
4
|
5
|
|
|
5
|
|
233
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
145
|
|
5
|
5
|
|
|
5
|
|
18
|
use warnings; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
131
|
|
6
|
5
|
|
|
5
|
|
16
|
use UR; |
|
5
|
|
|
|
|
4
|
|
|
5
|
|
|
|
|
34
|
|
7
|
|
|
|
|
|
|
our $VERSION = "0.46"; # UR $VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
UR::Object::Type->define( |
10
|
|
|
|
|
|
|
class_name => __PACKAGE__, |
11
|
|
|
|
|
|
|
is => ['UR::BoolExpr::Template::PropertyComparison'], |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _compare { |
15
|
0
|
|
|
0
|
|
|
my ($class,$comparison_value,@property_value) = @_; |
16
|
5
|
|
|
5
|
|
19
|
no warnings; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
468
|
|
17
|
0
|
0
|
|
|
|
|
if (@property_value == 0) { |
18
|
0
|
|
|
|
|
|
return ''; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
} else { |
21
|
0
|
|
|
|
|
|
for (@property_value) { |
22
|
0
|
0
|
|
|
|
|
return 1 if ($_); # Returns true if _any_ of the values are true |
23
|
|
|
|
|
|
|
} |
24
|
0
|
|
|
|
|
|
return ''; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
UR::BoolExpr::Template::PropertyComparison::True - Evaluates to true if the property's value is true |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
If the property returns multiple values, this comparison returns true if any of the values are true |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |