Plack::Middleware::Acme::Werewolf - Plack middleware of Acme::Apache::Werewolf
my $app = sub { ... }; builder { enable "Acme::Werewolf", moonlength => 4; $app; };
Plack middleware implementation of Acme::Apache::Werewolf which keeps werewolves out of your web site during the full moon.
Required. The period considered as a full moon (in day).
If you set moonlength with 4, the moon age from 12 to 16 is full moon.
Optional. The forbidden message. Default is 'Forbidden'.
Optional. The subroutine reference for resoneses takes the plack middleware itself, environment variable and moon age.
handler => sub { my ( $middleware, $env, $moon_age ) = @_; return [ 403, ['Content-Type' => 'text/plain'], ['Werewolf!'] ]; }
If set this option, message option is ignored.
message
Acme::Apache::Werewolf, Astro::MoonPhase
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
The author of Acme::Apache::Werewolf is Rich Bowen.
Copyright 2013 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Acme::Plack::Middleware::Acme::Werewolf, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Plack::Middleware::Acme::Werewolf
CPAN shell
perl -MCPAN -e shell install Acme::Plack::Middleware::Acme::Werewolf
For more information on module installation, please visit the detailed CPAN module installation guide.