Array-APX
view release on metacpan or search on metacpan
lib/Array/APX.pm view on Meta::CPAN
);
# Overload everything defined in %binary_operators:
eval "use overload '$_' => '$binary_operators{$_}';"
for keys(%binary_operators);
# Binary operators with trick (0 instead of '' or undef) - these will be generated
# automatically, too:
my %special_binary_operators = (
'==' => 'numeric_equal',
'!=' => 'numeric_not_equal',
'<' => 'numeric_less_than',
'<=' => 'numeric_less_or_equal',
'>' => 'numeric_greater_than',
'>=' => 'numeric_greater_or_equal',
'eq' => 'string_equal',
'ne' => 'string_not_equal',
'lt' => 'string_less_than',
'le' => 'string_less_or_equal',
'gt' => 'string_greater_than',
'ge' => 'string_greater_or_equal',
);
# Overload everything defined in %special_binary_operatos:
eval "use overload '$_' => '$special_binary_operators{$_}';"
for keys(%special_binary_operators);
( run in 0.231 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )