Plack::Middleware::RevisionPlate - Serves an endpoint returns application's REVISION.
REVISION
use Plack::Builder; use Plack::Middleware::RevisionPlate; builder { # Default revision_filename is ./REVISION. enable 'Plack::Middleware::RevisionPlate', path => '/site/sha1'; # Otherwise you can specify revision_filename. enable 'Plack::Middleware::RevisionPlate', path => '/site/sha1/somemodule', revision_filename => './modules/hoge/REVISION'; sub { my $env = shift; return [ 200, [], ['Hello! Plack'] ]; }; };
Plack::Middleware::RevisionPlate returns content of file REVISION (or the file specified by revision_filename option) on GET/HEAD request to path specified path option. Content of endpoint don't changes even if REVISION file changed, but returns 404 if REVISION file removed.
revision_filename
path
MIT License
Asato Wakisaka <asato.wakisaka@gmail.com>
This module is a perl port of ruby gem RevisionPlate by sorah.
To install Plack::Middleware::RevisionPlate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::RevisionPlate
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::RevisionPlate
For more information on module installation, please visit the detailed CPAN module installation guide.