Fork me on GitHub

Index


Name

App::Doh::Server - A Plack web application server

Synopsis

   #!/usr/bin/env perl

   use App::Doh::Server;

   App::Doh::Server->new->run_if_script;

Description

Serves HTML pages generated from microformats like Markdown and POD

Configuration and Environment

Defines no attributes

Subroutines/Methods

BUILD

Calls the documentation model at application start time. Means that the startup time is longer but the response time for the first request is shorter

Log the server startup event

dispatch_request

The Web::Simple API method used to dispatch requests

render

Each of the dispatch_request methods returns a tuple containing the model name and method to call in addition to the parameters passed by Web::Simple. A response filter is installed by the Root controller handles the tuple by calling this method. It in turn calls the model and then the view. Wraps the model and view calls in a try / catch block and renders an exception page if those calls fail. Creates an App::Doh::Request object which it passes into the model and view methods calls

to_psgi_app

Sets the application mount point and pushes some middleware into the Plack stack

Diagnostics

Exporting APP_DOH_DEBUG and setting it to true causes the development server to start logging at the debug level

The development server can be started using

   plackup bin/doh-server

Starting the daemon with the -D option will cause it to print debug information to the log file var/logs/daemon.log

Dependencies

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <pjfl@cpan.org>