HTTP::AppServer::Plugin::FileRetriever - Plugin for HTTP::AppServer that retrieves files from a document root.
use HTTP::AppServer; my $server = HTTP::AppServer->new(); $server->plugin('FileRetriever', DocRoot => '/path/to/docroot');
Plugin for HTTP::AppServer that retrieves files from a document root.
Defines the document root directory where the files are retrieved from.
FileRetriever handles all URLs matching '^\/(.*)$'. It stops the server from processing any other URL handlers after that so it is best loaded as the last one.
None.
Currently FileRetriever can handle HTML, CSS, JS, PNG, JPG/JPEG and GIF files. The mimetype is determined by inspecting the filename extension.
HTTP::AppServer, HTTP::AppServer::Plugin
Tom Kirchner, <tom@tkirchner.com>
Copyright (C) 2010 by Tom Kirchner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install HTTP::AppServer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::AppServer
CPAN shell
perl -MCPAN -e shell install HTTP::AppServer
For more information on module installation, please visit the detailed CPAN module installation guide.