« blib/lib/Command/Test/Tree1/Echo2.pm
↑ Summary
blib/lib/UR/BoolExpr/Template/PropertyComparison/Like.pm »
| 1 | package UR::BoolExpr::Template::PropertyComparison::False; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use UR; | ||
| 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 | my ($class,$comparison_value,@property_value) = @_; | ||
| 14 | no warnings; | ||
| 15 | if (@property_value == 0) { | ||
| 16 | return 1; | ||
| 17 | |||
| 18 | } else { | ||
| 19 | for (@property_value) { | ||
| 20 | return 1 if (! $_); # Returns true if _any_ of the values are false | ||
| 21 | } | ||
| 22 | 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 |