Skip to content

Commit

Permalink
better examples for many methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 19, 2012
1 parent 21f8513 commit a228918
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,4 +1,7 @@

3.12 2012-07-20
- Improved documentation.

3.11 2012-07-19
- Added or method to Test::Mojo. (moritz, sri)
- Added file and serve_asset methods to Mojolicious::Static.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo.pm
Expand Up @@ -91,7 +91,7 @@ Mojo - Duct tape for the HTML5 web!
Mojo provides a flexible runtime environment for Perl real-time web
frameworks. It provides all the basic tools and helpers needed to write
simple web applications and higher level web frameworks such as
simple web applications and higher level web frameworks, such as
L<Mojolicious>.
See L<Mojolicious> for more!
Expand Down Expand Up @@ -169,7 +169,7 @@ Application configuration.
=head2 C<handler>
$app->handler($tx);
$app->handler(Mojo::Transaction::HTTP->new);
The handler is the main entry point to your application or framework and will
be called for each new transaction, which will usually be a
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent.pm
Expand Up @@ -987,7 +987,7 @@ append a callback to perform requests non-blocking.
=head2 C<start>
$ua = $ua->start($tx);
my $tx = $ua->start(Mojo::Transaction::HTTP->new);
Process blocking transaction. You can also append a callback to perform
transactions non-blocking.
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -270,7 +270,7 @@ implements the following new ones.
=head2 C<endpoint>
my ($scheme, $host, $port) = $t->endpoint($tx);
my ($scheme, $host, $port) = $t->endpoint(Mojo::Transaction::HTTP->new);
Actual endpoint for transaction.
Expand Down Expand Up @@ -318,20 +318,20 @@ enforce it by setting the header manually.
=head2 C<peer>
my ($scheme, $host, $port) = $t->peer($tx);
my ($scheme, $host, $port) = $t->peer(Mojo::Transaction::HTTP->new);
Actual peer for transaction.
=head2 C<proxy_connect>
my $tx = $t->proxy_connect($old);
my $tx = $t->proxy_connect(Mojo::Transaction::HTTP->new);
Build L<Mojo::Transaction::HTTP> proxy connect request for transaction if
possible.
=head2 C<redirect>
my $tx = $t->redirect($old);
my $tx = $t->redirect(Mojo::Transaction::HTTP->new);
Build L<Mojo::Transaction::HTTP> followup request for C<301>, C<302>, C<303>,
C<307> or C<308> redirect response if possible.
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious.pm
Expand Up @@ -34,7 +34,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Rainbow';
our $VERSION = '3.11';
our $VERSION = '3.12';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down Expand Up @@ -407,16 +407,16 @@ request.
=head2 C<dispatch>
$app->dispatch($c);
$app->dispatch(Mojolicious::Controller->new);
The heart of every Mojolicious application, calls the C<static> and C<routes>
dispatchers for every request and passes them a L<Mojolicious::Controller>
object.
=head2 C<handler>
$app->handler($tx);
$app->handler($c);
$app->handler(Mojo::Transaction::HTTP->new);
$app->handler(Mojolicious::Controller->new);
Sets up the default controller and calls process for every request.
Expand Down
6 changes: 4 additions & 2 deletions lib/Mojolicious/Static.pm
Expand Up @@ -189,6 +189,8 @@ Serve static file for L<Mojolicious::Controller> object.
Get L<Mojo::Asset::File> or L<Mojo::Asset::Memory> object for a file, relative
to C<paths> or from C<classes>.
my $content = $static->file('foo/bar.html')->slurp;
=head2 C<serve>
my $success = $static->serve(Mojolicious::Controller->new, 'foo/bar.html');
Expand All @@ -199,8 +201,8 @@ Serve a specific file, relative to C<paths> or from C<classes>.
$static->serve_asset(Mojolicious::Controller->new, Mojo::Asset::File->new);
Serve a L<Mojo::Asset::File> or L<Mojo::Asset::Memory> object with range and
last modified support.
Serve a L<Mojo::Asset::File> or L<Mojo::Asset::Memory> object with C<Range>
and C<If-Modified-Since> support.
=head1 SEE ALSO
Expand Down

0 comments on commit a228918

Please sign in to comment.