Skip to content

Commit

Permalink
Fix Apache2 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Apr 10, 2010
1 parent 9115816 commit 707263e
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions lib/Plack/Handler/Apache2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,23 @@ Plack::Handler::Apache2 - Apache 2.0 handlers to run PSGI application
PerlSetVar psgi_app /path/to/app.psgi
</Location>
# Optional, preload the application in the parent like startup.pl
<Perl>
use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload("/path/to/app.psgi");
</Perl>
# Or create your own handler:
=head1 DESCRIPTION
This is a handler module to run any PSGI application with mod_perl on Apache 2.x.
=head1 CREATING CUSTOM HANDLER
If you want to create a custom handler that loads or creates PSGI
applications using other means than loading from C<.psgi> files, you
can create your own handler class and use C<call_app> class method to
run your application.
package My::ModPerl::Handler;
use Plack::Handler::Apache2;
Expand All @@ -155,19 +166,6 @@ Plack::Handler::Apache2 - Apache 2.0 handlers to run PSGI application
Plack::Handler::Apache2->call_app($r, $app);
}
=head1 DESCRIPTION
This is a handler module to run any PSGI application with mod_perl on Apache 2.x.
=head1 METHODS
=head2 call_app($r, $app)
The mod_perl handler in this package loads the app and calls this method. If
you'd like to do something different, you can still make use of this module by
preparing $r and $app in some other fashion and calling this as a class
method.
=head1 AUTHOR
Tatsuhiko Miyagawa
Expand Down

0 comments on commit 707263e

Please sign in to comment.