Skip to content

Commit

Permalink
added examples for next and previous methods in Mojo::DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 31, 2012
1 parent f6305c5 commit d3f92df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@

3.54 2012-11-01
- Added next and previous methods to Mojo::DOM.
- Improved documentation.
- Improved tests.

3.53 2012-10-31
Expand Down
6 changes: 6 additions & 0 deletions lib/Mojo/DOM.pm
Expand Up @@ -598,6 +598,9 @@ Find element namespace.
Next sibling of element.
# "<h2>B</h2>"
$dom->parse('<div><h1>A</h1><h2>B</h2></div>')->at('h1')->next;
=head2 C<parent>
my $parent = $dom->parent;
Expand Down Expand Up @@ -637,6 +640,9 @@ Prepend to element content.
Previous sibling of element.
# "<h1>A</h1>"
$dom->parse('<div><h1>A</h1><h2>B</h2></div>')->at('h2')->previous;
=head2 C<remove>
my $old = $dom->remove;
Expand Down

0 comments on commit d3f92df

Please sign in to comment.