Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Run .par as a PSGI application
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/Plack/App
t
xt
.gitignore
.shipit
Changes
MANIFEST
MANIFEST.SKIP
Makefile.PL
README

README

NAME
    Plack::App::PAR - Run .par bundle as a PSGI application

SYNOPSIS
      % plackup -MPlack::App::PAR -e 'Plack::App::PAR->new(file => "/path/to/myapp.par")->to_app'

DESCRIPTION
    Plack::App::PAR is a Plack endpoint to run PAR bundle as a PSGI
    application.

    You can use the standard .par files - the only restriction is that you
    have to have an *entry point* PSGI script file as a "app.psgi" inside
    "script" directory (which can be changed with the "script" option - see
    below).

      % pp -I lib -p -o myapp.par app.psgi

    This will create a "myapp.par" bundle with "app.psgi" as an entry point.

WHY?
    Inspired by
    <http://www.modernperlbooks.com/mt/2011/03/what-perl-could-learn-from-ja
    va-wars.html> :)

OPTIONS
    file
        The path to the PAR archive file you want to run. Required.

    script
        The name of the entry point script inside the PAR archive.
        "script/app.psgi" by default.

TODO/BUGS
    *   There's no cleaner way to locate non-perl library files, for example
        static files directory to use for Static middleware path. I guess
        File::ShareDir::PAR could be used.

    *   I'm not sure what happens if you instantiate multiple applications
        of this class for multiple .par files in the same web server
        process. Because PAR's interface is based on "import", I won't be
        surprised if you get an unexpected result.

AUTHOR
    Tatsuhiko Miyagawa <miyagawa@bulknews.net>

COPYRIGHT
    Copyright 2011- Tatsuhiko Miyagawa

LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

SEE ALSO
    PAR

Something went wrong with that request. Please try again.