File Coverage

lib/UR/BoolExpr/Template/PropertyComparison/False.pm
Criterion Covered Total %
statement 12 18 66.6
branch 0 4 0.0
condition n/a
subroutine 4 5 80.0
pod n/a
total 16 27 59.2


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