Navigation Menu

Skip to content

Commit

Permalink
renamed to_psgi method in Mojo::Server::PSGI to to_psgi_app
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 19, 2012
1 parent 2b9bf7a commit 700e5da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@
This file documents the revision history for Perl extension Mojolicious.

2.52 2012-02-19 00:00:00
- Renamed to_psgi method in Mojo::Server::PSGI to to_psgi_app.
- Improved documentation.

2.51 2012-02-19 00:00:00
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo/Server/PSGI.pm
Expand Up @@ -49,7 +49,7 @@ sub run {
\@headers, Mojo::Server::PSGI::_IO->new(tx => $tx)];
}

sub to_psgi {
sub to_psgi_app {
(my $self = shift)->app;
return sub { $self->run(@_) }
}
Expand Down Expand Up @@ -110,7 +110,7 @@ Mojo::Server::PSGI - PSGI server
# Resume transaction
$tx->resume;
});
my $app = $psgi->to_psgi;
my $app = $psgi->to_psgi_app;
=head1 DESCRIPTION
Expand All @@ -134,9 +134,9 @@ implements the following new ones.
Run L<PSGI>.
=head2 C<to_psgi>
=head2 C<to_psgi_app>
my $app = $psgi->to_psgi;
my $app = $psgi->to_psgi_app;
Turn L<Mojo> application into L<PSGI> application. Note that this method is
EXPERIMENTAL and might change without warning!
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Command/psgi.pm
Expand Up @@ -8,7 +8,7 @@ has usage => "usage: $0 psgi\n";

# "In the end it was not guns or bombs that defeated the aliens,
# but that humblest of all God's creatures... the Tyrannosaurus Rex."
sub run { Mojo::Server::PSGI->new->to_psgi }
sub run { Mojo::Server::PSGI->new->to_psgi_app }

1;
__END__
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/psgi.t
Expand Up @@ -34,7 +34,7 @@ post '/params' => sub {
};

# Binding
my $app = Mojo::Server::PSGI->new->to_psgi;
my $app = Mojo::Server::PSGI->new->to_psgi_app;
my $content = 'hello=world';
open my $body, '<', \$content;
my $env = {
Expand Down

0 comments on commit 700e5da

Please sign in to comment.