Skip to content

Commit

Permalink
added a few more documentation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 9, 2011
1 parent c0a2a2a commit 864e001
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -362,6 +362,7 @@ or C<307> redirect response if possible.
my $tx = $t->tx(GET => 'mojolicio.us');
my $tx = $t->tx(POST => 'http://mojolicio.us');
my $tx = $t->tx(GET => 'http://kraih.com' => {Accept => '*/*'});
my $tx = $t->tx(PUT => 'http://kraih.com' => 'Hi!');
my $tx = $t->tx(POST => 'http://kraih.com' => {Accept => '*/*'} => 'Hi!');
Versatile general purpose L<Mojo::Transaction::HTTP> builder for requests.
Expand Down
12 changes: 9 additions & 3 deletions lib/Mojolicious/Routes/Pattern.pm
Expand Up @@ -302,16 +302,22 @@ __END__
=head1 NAME
Mojolicious::Routes::Pattern - Routes pattern
Mojolicious::Routes::Pattern - Routes pattern engine
=head1 SYNOPSIS
use Mojolicious::Routes::Pattern;
# Create pattern
my $pattern = Mojolicious::Routes::Pattern->new('/test/:name');
# Match routes
my $result = $pattern->match('/test/sebastian');
say $result->{name};
=head1 DESCRIPTION
L<Mojolicious::Routes::Pattern> is a container for routes pattern which are
used to match paths against.
L<Mojolicious::Routes::Pattern> is the core of L<Mojolicious::Routes>.
=head1 ATTRIBUTES
Expand Down

0 comments on commit 864e001

Please sign in to comment.