All Projects → miyagawa → Plack-App-PAR

miyagawa / Plack-App-PAR

Licence: other
Run .par as a PSGI application

Programming Languages

perl
6916 projects
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 <[email protected]>

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].