1HTTP::Server::Simple::SUtsaetricC(o3n)tributed Perl DocuHmTeTnPt:a:tSieornver::Simple::Static(3)
2
3
4

NAME

6       HTTP::Server::Simple::Static - Serve static files with
7       HTTP::Server::Simple
8

VERSION

10       This documentation refers to HTTP::Server::Simple::Static version 0.07
11

SYNOPSIS

13           package MyServer;
14
15           use base qw(HTTP::Server::Simple::CGI);
16           use HTTP::Server::Simple::Static;
17
18           sub handle_request {
19               my ( $self, $cgi ) = @_;
20               return $self->serve_static( $cgi, $webroot );
21           }
22
23           package main;
24
25           my $server = MyServer->new();
26           $server->run();
27

DESCRIPTION

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

SUBROUTINES/METHODS

33       serve_static
34           Takes a base directory and a web path, and tries to serve a static
35           file. Returns 0 if the file does not exist, returns 1 on success.
36

BUGS AND LIMITATIONS

38       Bugs or wishlist requests should be submitted via http://rt.cpan.org/
39

SEE ALSO

AUTHOR

42       Stephen Quinney "sjq-perl@jadevine.org.uk"
43
44       Thanks to Marcus Ramberg "marcus@thefeed.no" and Simon Cozens for
45       initial implementation.
46
48       Copyright 2006 - 2008. Stephen Quinney "sjq-perl@jadevine.org.uk"
49
50       You may distribute this code under the same terms as Perl itself.
51
52
53
54perl v5.12.0                      2008-03-19   HTTP::Server::Simple::Static(3)
Impressum