Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

http::server::simple::static(3pm) [debian man page]

HTTP::Server::Simple::Static(3pm)			User Contributed Perl Documentation			 HTTP::Server::Simple::Static(3pm)

NAME
HTTP::Server::Simple::Static - Serve static files with HTTP::Server::Simple VERSION
This documentation refers to HTTP::Server::Simple::Static version 0.07 SYNOPSIS
package MyServer; use base qw(HTTP::Server::Simple::CGI); use HTTP::Server::Simple::Static; sub handle_request { my ( $self, $cgi ) = @_; return $self->serve_static( $cgi, $webroot ); } package main; my $server = MyServer->new(); $server->run(); DESCRIPTION
this mixin adds a method to serve static files from your HTTP::Server::Simple subclass. SUBROUTINES
/METHODS serve_static Takes a base directory and a web path, and tries to serve a static file. Returns 0 if the file does not exist, returns 1 on success. BUGS AND LIMITATIONS
Bugs or wishlist requests should be submitted via http://rt.cpan.org/ SEE ALSO
AUTHOR
Stephen Quinney "sjq-perl@jadevine.org.uk" Thanks to Marcus Ramberg "marcus@thefeed.no" and Simon Cozens for initial implementation. LICENSE AND COPYRIGHT
Copyright 2006 - 2008. Stephen Quinney "sjq-perl@jadevine.org.uk" You may distribute this code under the same terms as Perl itself. perl v5.14.2 2012-06-30 HTTP::Server::Simple::Static(3pm)

Check Out this Related Man Page

HTTP::Server::Simple::Recorder(3pm)			User Contributed Perl Documentation		       HTTP::Server::Simple::Recorder(3pm)

NAME
HTTP::Server::Simple::Recorder - Mixin to record HTTP::Server::Simple's sockets SYNOPSIS
package MyServer; use base qw/HTTP::Server::Simple::Recorder HTTP::Server::Simple::CGI/; sub recorder_prefix { "path/to/logs/record" } # defaults to /tmp/http-server-simple-recorder # logs to path/to/logs/record.34244.1.in, # path/to/logs/record.34244.1.out, # path/to/logs/record.34244.2.in, # path/to/logs/record.34244.2.out, etc, if 34244 is the PID of the server DESCRIPTION
This module allows you to record all HTTP communication between an HTTP::Server::Simple-derived server and its clients. It is a mixin, so it doesn't itself subclass HTTP::Server::Simple; you need to subclass from both HTTP::Server::Simple::Recorder and an actual HTTP::Server::Simple subclass, and HTTP::Server::Simple::Recorder should be listed first. Every time a client connects to your server, this module will open a pair of files and log the communication between the file and server to these files. Each connection gets a serial number starting at 1. The filename used is "<$self-"recorder_prefix>>, then a period, then the connection serial number, then a period, then either "in" or "out". "recorder_prefix" defaults to "/tmp/http-server-simple-recorder", but you can override that in your subclass. For example, you might want to include the process ID. DEPENDENCIES
IO::Tee, HTTP::Server::Simple. BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests to "bug-http-server-simple-recorder@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. SEE ALSO
HTTP::Server::Simple, HTTP::Recorder. AUTHOR
David Glasser "<glasser@bestpractical.com>" LICENCE AND COPYRIGHT
Copyright (c) 2005, Best Practical Solutions, LLC. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.10.0 2008-11-29 HTTP::Server::Simple::Recorder(3pm)
Man Page