HTTP::Server::Simple::Static - Serve static files with HTTP::Server::Simple
use base 'HTTP::Server::Simple::CGI'; use HTTP::Server::Simple::Static; sub handle_request { my ($self,$cgi) = @_; return $self->serve_static($cgi,$webroot); }
this mixin adds a method to serve static files from your HTTP::Server::Simple subclass.
Takes a base directory and a web path, and tries to serve a static file.
Bugs or wishlist requests should be submitted via http://rt.cpan.org/
Stephen Quinney sjq-perl@jadevine.org.uk
sjq-perl@jadevine.org.uk
Thanks to Marcus Ramberg marcus@thefeed.no and Simon Cozens for initial implementation.
marcus@thefeed.no
You may distribute this code under the same terms as Perl itself.
To install HTTP::Server::Simple::Static, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Server::Simple::Static
CPAN shell
perl -MCPAN -e shell install HTTP::Server::Simple::Static
For more information on module installation, please visit the detailed CPAN module installation guide.