Acme-LifeUniverseEverything
view release on metacpan or search on metacpan
lib/Acme/LifeUniverseEverything.pm view on Meta::CPAN
}
$ops{neg} = sub { Acme::LifeUniverseEverything->new( 0-("$_[0]") ); };
$ops{$_} = eval qq ! sub {
\$_[2] ? (\$_[1] $_ "\$_[0]")
: ("\$_[0]" $_ \$_[1]);
} ! for qw( <=> ); # << >> !< <= > >= == != <=> );
$ops{$_} = eval qq ! sub { $_("\$_[0]"); } !
for qw( ~ ! cos sin exp log sqrt );
$ops{abs} = sub { Acme::LifeUniverseEverything->new( abs("$_[0]") ); };
# $ops{atan2} = sub { $_[2] ? atan2($_[1], "$_[0]") : atan2("$_[0]", $_[1]) };
sub import {
overload->import(%ops);
overload::constant
integer => sub { Acme::LifeUniverseEverything->new(shift) },
( run in 0.676 second using v1.01-cache-2.11-cpan-49f99fa48dc )