Marcus Ramberg > HTTP-Server-Simple-Static-0.02 > HTTP::Server::Simple::Static

Download:
HTTP-Server-Simple-Static-0.02.tar.gz

Dependencies

Annotate this POD (2)

CPAN RT

New  2
Open  1
View/Report Bugs
Module Version: 0.02   Source   Latest Release: HTTP-Server-Simple-Static-0.09

NAME ^

HTTP::Server::Simple::Static - Serve static files with HTTP::Server::Simple

SYNOPSIS ^

    use base 'HTTP::Server::Simple';
    use HTTP::Server::Simple::Static;

    sub handle_request {
        my ($self,$cgi) = @_;
        return $self->serve_static($cgi,$webroot);
    }

DESCRIPTION ^

this mixin adds a method to serve static files from your HTTP::Server::Simple subclass.

METHODS ^

serve_static

Takes a base directory and a web path, and tries to serve a static file.

SEE ALSO ^

AUTHOR ^

Marcus Ramberg marcus@thefeed.no Thanks to Simon Cozens for initial implementation.

LICENSE ^

You may distribute this code under the same terms as Perl itself.

syntax highlighting: