Skip to content

Commit

Permalink
made dom examples more marcus proof
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 5, 2011
1 parent 3767368 commit c936461
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Mojo/Message.pm
Expand Up @@ -700,7 +700,11 @@ L<Mojo::Cookie::Response> objects.
Turns content into a L<Mojo::DOM> object and takes an optional selector to
perform a C<find> on it right away, which returns a collection.
$message->dom->find('h1, h2, h3')->each(sub { say $_->text });
# Perform "find" right away
$message->dom('h1, h2, h3')->each(sub { say $_->text });
# Use everything else Mojo::DOM has to offer
say $message->dom->at('title')->text;
=head2 C<error>
Expand Down

0 comments on commit c936461

Please sign in to comment.