Explicitly document the wrong Engine::PSGI thing.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / PSGI.pod
CommitLineData
ae908e7e 1=pod
2
3=head1 Catalyst and PSGI
4
5Catalyst used to contain a whole set of C<< Catalyst::Engine::XXXX >> classes to
6adapt to various different web servers, and environments (e.g. CGI, FastCGI, mod_perl)
7etc.
8
9This has been changed so that all of that work is done by Catalyst just implementing
10the L<PSGI> specification, and using L<Plack>'s adaptors to implement that functionality.
11
12This means that we can share common code, and fixes for specific web servers.
13
14=head1 I already have an application
15
16If you already have a Catalyst application, then this means very little, and you should be
17able to upgrade to the latest release with little or no trouble (See notes in L<Catalyst::Upgrading>
18for specifics about your web server deployment).
19
20=head1 Writing your own PSGI file.
21
22=head2 What is a .psgi file
23
24A C<< .psgi >> file lets you manually controll how your application code reference is built.
25
26Catalyst normally takes care of this for you, but it's possible to do it manually by
27creating a C<myapp.psgi> file in the root of your application.
28
29The simplest C<.psgi> file for an application called C<TestApp> would be:
30
31 use strict;
32 use warnings;
33 use TestApp;
34
35 my $app = sub { TestApp->psgi_app(@_) };
36
37It should be noted that Catalyst may apply a number of middleware components for
38you automatically, and these B<will not> be applied if you manually create
39a psgi file yourself. Details of these middlewares can be found XXXX FIXME
40
41Additional information about psgi files can be found at:
42L<http://search.cpan.org/dist/Plack/lib/Plack.pm#.psgi_files>
43
44=head2 Why would I want to make a .psgi file?
45
46Writing your own .psgi file allows you to use the alternate L<plackup> command
47to start your application, and allows you to add classes and extensions
48that implement L<Plack::Middleware>, such as L<Plack::Middleware::ErrorDocument>,
49or L<Plack::Middleware::AccessLog>.
50
51=head2 What is in the .psgi Catalyst generates by default?
52
53=head1 SEE ALSO
54
55L<Catalyst::Upgrading>, L<Plack>, L<PSGI::FAQ>, L<PSGI>.
56
57=head1 AUTHORS
58
59Catalyst Contributors, see Catalyst.pm
60
61=head1 COPYRIGHT
62
63This library is free software. You can redistribute it and/or modify
64it under the same terms as Perl itself.
65
66=cut