Acme-Ehoh
view release on metacpan or search on metacpan
Acme::Ehoh caluclate ehoh (lucky direction on Onmyodo).
# FUNCTION
- direction($year)
Return ehoh direction of specified year (value 0 means north, 90 means east,
and so on).
On error, return undef.
# LICENSE
Copyright (C) SHIRAKATA Kentaro.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
# AUTHOR
lib/Acme/Ehoh.pm view on Meta::CPAN
my @dir = (255, 165, 345, 165, 75);
sub direction {
my $arg = shift;
$arg =~ /^(-?\d+)$/;
my $year = $1;
if(!defined $year || $year <= 0){
return undef;
}
return $dir[$year % 5];
}
1;
__END__
=head1 NAME
lib/Acme/Ehoh.pm view on Meta::CPAN
=head1 FUNCTION
=over
=item direction($year)
Return ehoh direction of specified year (value 0 means north, 90 means east,
and so on).
On error, return undef.
=back
=head1 LICENSE
Copyright (C) SHIRAKATA Kentaro.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
( run in 0.900 second using v1.01-cache-2.11-cpan-d80b1682f3f )