The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTTP::AppServer::Plugin::FileRetriever - Plugin for HTTP::AppServer that retrieves files from a document root.

SYNOPSIS

  use HTTP::AppServer;
  my $server = HTTP::AppServer->new();
  $server->plugin('FileRetriever', DocRoot => '/path/to/docroot');

DESCRIPTION

Plugin for HTTP::AppServer that retrieves files from a document root.

Plugin configuration

DocRoot => dir

Defines the document root directory where the files are retrieved from.

Installed URL handlers

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.

Installed server properties

None.

Installed server methods

None.

Handled mimetypes

Currently FileRetriever can handle HTML, CSS, JS, PNG, JPG/JPEG and GIF files. The mimetype is determined by inspecting the filename extension.

SEE ALSO

HTTP::AppServer, HTTP::AppServer::Plugin

AUTHOR

Tom Kirchner, <tom@tkirchner.com>

COPYRIGHT AND LICENSE

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.