Skip to content

Commit

Permalink
Added documentation for the new flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
frodwith committed Feb 26, 2010
1 parent ce62186 commit ae88865
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/Plack/Handler/Apache2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,41 @@ Plack::Handler::Apache2 - Apache 2.0 handlers to run PSGI application
Plack::Handler::Apache2->preload("/path/to/app.psgi");
</Perl>
# Or create your own handler:
package My::ModPerl::Handler;
use Plack::Handler::Apache2;
sub get_app {
# magic!
}
sub handler {
my $r = shift;
my $app = get_app();
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
=head1 CONTRIBUTORS
Paul Driver
=head1 SEE ALSO
L<Plack>
Expand Down

0 comments on commit ae88865

Please sign in to comment.