Skip to content
Newer
Older
100644 119 lines (89 sloc) 4.53 KB
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
1 NAME
2 Plack - PSGI reference implementation and utilities
3
4 DESCRIPTION
5 Plack is a set of PSGI reference server implementations and helper
6 utilities for Web application frameworks, exactly like Ruby's Rack.
7
8c1aa81 @miyagawa Checking in changes prior to tagging of version 0.9021. Changelog dif…
miyagawa authored Dec 8, 2009
8 See PSGI for the PSGI specification and PSGI::FAQ to know what PSGI and
9 Plack are and why we need them.
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
10
11 MODULES AND UTILITIES
12 Plack::Server
13 Plack::Server is a namespace for PSGI server implementations. We have
14 Standalone, CGI, FCGI, Apache, AnyEvent, Coro, Danga::Socket and many
15 server environments that you can run PSGI applications on.
16
17 See Plack::Server how to write your own server implementation.
18
19 Plack::Loader
20 Plack::Loader is a loader to load one of Plack::Server backends and run
21 PSGI application code reference with it.
22
23 Plack::Util
24 Plack::Util contains a lot of utility functions for server implementors
25 as well as middleware authors.
26
27 .psgi files
28 PSGI application is a code reference but it's not easy to pass code
29 reference in the command line or configuration files, so Plack uses a
30 convention that you need a file named "app.psgi" or alike, which would
31 be loaded (via perl's core function "do") to return the PSGI application
32 code reference. See eg/dot-psgi directory for the example ".psgi" files.
33
0f1a389 @miyagawa Checking in changes prior to tagging of version 0.9026. Changelog dif…
miyagawa authored Jan 1, 2010
34 plackup, Plack::Runner
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
35 plackup is a command line launcher to run PSGI applications from command
36 line using Plack::Loader to load PSGI backends. It can be used to run
37 standalone servers and FastCGI daemon processes. Other server backends
38 like Apache2 needs a separate configuration but ".psgi" application file
39 can still be the same.
40
0f1a389 @miyagawa Checking in changes prior to tagging of version 0.9026. Changelog dif…
miyagawa authored Jan 1, 2010
41 If you want to write your own frontend that replaces, or adds
42 functionalities to plackup, take a look at Plack::Runner module.
43
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
44 Plack::Middleware
45 PSGI middleware is a PSGI application that wraps existent PSGI
46 application and plays both side of application and servers. From the
47 servers the wrapped code reference still looks like and behaves exactly
48 the same as PSGI applications.
49
50 Plack::Middleware gives you an easy way to wrap PSGI applications with a
51 clean API, and compatibility with Plack::Builder DSL.
52
53 Plack::Builder
fb031b2 @miyagawa remove feature() and make them all required to be less annoying
miyagawa authored Oct 27, 2009
54 Plack::Builder gives you a DSL that you can enable Middleware in ".psgi"
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
55 files to wrap existent PSGI applications.
56
57 Plack::Request, Plack::Response
58 Plack::Request gives you a nice wrapper API around PSGI $env hash to get
59 headers, cookies and query parameters much like Apache::Request in
60 mod_perl.
61
62 Plack::Response does the same to construct the response array reference.
63
64 Plack::Test
65 Plack::Test is an unified interface to test your PSGI application using
66 standard HTTP::Request and HTTP::Response pair with simple callbacks.
67
68 Plack::Test::Suite
69 Plack::Test::Suite is a test suite to test a new PSGI server backend.
70
8c1aa81 @miyagawa Checking in changes prior to tagging of version 0.9021. Changelog dif…
miyagawa authored Dec 8, 2009
71 CONTRIBUTING
72 Patches and Bug Fixes
73 Small patches and bug fixes can be either submitted via nopaste on IRC
74 <irc://irc.perl.org/#plack> or email. You could also fork on github
75 (http://github.com/miyagawa/Plack) to make larger fixes.
76
77 Module Namespaces
78 Modules added to the Plack:: sub-namespaces should be reasonably generic
4398f4e @miyagawa Checking in changes prior to tagging of version 0.9022. Changelog dif…
miyagawa authored Dec 13, 2009
79 components which are useful as building blocks and not just simply using
8c1aa81 @miyagawa Checking in changes prior to tagging of version 0.9021. Changelog dif…
miyagawa authored Dec 8, 2009
80 Plack.
81
82 Middleware authors are free to use the Plack::Middleware:: namespace for
83 their middleware components. Middleware must be written in the pipeline
84 style such that they can chained together with other middleware
85 components. The Plack::Middleware:: modules in the core distribution are
86 good examples of such modules. It is recommended that you inherit from
87 Plack::Middleware for these types of modules.
88
89 Not all middleware components are wrappers, but instead are more like
90 endpoints in a middleware chain. These types of components should use
91 the Plack::App:: namespace. Again, look in the core modules to see
92 excellent examples of these (Plack::App::File, Plack::App::Directory,
93 etc.). It is recommended that you inherit from Plack::Component for
94 these types of modules.
95
9d1f776 @miyagawa added notes about Task::Plack in Makefile.PL
miyagawa authored Dec 15, 2009
96 DO NOT USE Plack:: namespace to build a new web application or a
97 framework. It's like naming your application under CGI:: namespace if
98 it's supposed to run on CGI and that is a really bad choice and confuse
99 people.
100
76b0753 @miyagawa make Static dependencies as optional (but default on)
miyagawa authored Oct 21, 2009
101 AUTHORS
102 Tatsuhiko Miyagawa
103
104 Yuval Kogman
105
106 Tokuhiro Matsuno
107
108 Kazuhiro Osawa
109
110 Kazuho Oku
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
111
112 SEE ALSO
578693f @miyagawa test_requires
miyagawa authored Oct 4, 2009
113 PSGI <http://plackperl.org/>
ed99f15 @miyagawa use Module::Install::ReadmeFromPod
miyagawa authored Sep 30, 2009
114
115 LICENSE
116 This library is free software; you can redistribute it and/or modify it
117 under the same terms as Perl itself.
118
Something went wrong with that request. Please try again.