our
$VERSION
=
"0.47"
;
UR::Object::Type->define(
class_name
=> __PACKAGE__,
is
=> [
'UR::BoolExpr::Template::PropertyComparison'
],
);
sub
_compare {
my
(
$class
,
$comparison_value
,
@property_value
) =
@_
;
my
$cv_is_number
= Scalar::Util::looks_like_number(
$comparison_value
);
no
warnings
'uninitialized'
;
foreach
my
$property_value
(
@property_value
) {
my
$pv_is_number
= Scalar::Util::looks_like_number(
$property_value
);
if
(
$cv_is_number
and
$pv_is_number
) {
return
1
if
(
$property_value
<=
$comparison_value
);
}
else
{
return
1
if
(
$property_value
le
$comparison_value
);
}
}
return
''
;
}
1;