Skip to content

Commit

Permalink
pod update
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 25, 2010
1 parent a3efb32 commit 5f198ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/Mojolicious/Guides/Cheatsheet.pod
Expand Up @@ -205,6 +205,12 @@ Maximum size for HTTP messages in bytes, defaults to C<524288>.

MOJO_MAX_MESSAGE_SIZE=1024

=head2 C<MOJO_MAX_REDIRECTS>

MOJO_MAX_REDIRECTS=3

Maximum number of redirects L<Mojo::Client> will follow, defaults to C<0>.

=head2 C<MOJO_MODE>

Run mode for the L<Mojolicious> application, should contain a valid mode like
Expand Down
8 changes: 6 additions & 2 deletions lib/ojo.pm
Expand Up @@ -23,8 +23,8 @@ sub import {
eval "package $caller; use Mojolicious::Lite;";

# Allow redirects
my $client = Mojo::Client->singleton;
$client->max_redirects(1) unless $client->max_redirects;
Mojo::Client->singleton->max_redirects(1)
unless defined $ENV{MOJO_MAX_REDIRECTS};

# Functions
*{"${caller}::Oo"} = *{"${caller}::b"} = \&b;
Expand Down Expand Up @@ -109,6 +109,10 @@ object.
Perform C<GET> request and turn response into a L<Mojo::Message::Response>
object.
One redirect will be followed by default, you can change this behavior with
the C<MOJO_MAX_REDIRECTS> environment variable.
MOJO_MAX_REDIRECTS=0 perl -Mojo -e 'b(g("mojolicious.org")->code)->say'
=head2 C<p>
Expand Down

0 comments on commit 5f198ab

Please sign in to comment.