Skip to content
Browse files

made dom examples more marcus proof

  • Loading branch information...
1 parent 3767368 commit c936461290cf1b7b01e68ebde7aca2e341af29f3 @kraih kraih committed Nov 5, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Mojo/Message.pm
View
6 lib/Mojo/Message.pm
@@ -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>

0 comments on commit c936461

Please sign in to comment.
Something went wrong with that request. Please try again.