Permalink
Browse files

make an explicit as_psgi example

  • Loading branch information...
1 parent 95ca5d2 commit 8045d0a3b3c8af1b36d1c6cd46dd8dc815ca97f5 @rjbs rjbs committed Jul 12, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/HTML/Mason/PSGIHandler.pm
View
12 lib/HTML/Mason/PSGIHandler.pm
@@ -134,10 +134,16 @@ any web servers that support PSGI.
=head1 as_psgi
- my $app = $h->as_psgi;
+This method returns a subroutine to be used as a PSGI application.
+
+In other words, these are equivalent:
-This method returns a subroutine to be used as a PSGI application, exactly as
-shown in the SYNOPSIS.
+ my $app = sub {
+ my $env = shift;
+ $h->handle_psgi($env);
+ };
+
+ my $app = $h->as_psgi;
=head2 new_psgi

0 comments on commit 8045d0a

Please sign in to comment.