Skip to content

Commit

Permalink
move AUTOLOAD sections above OPERATORS
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 23, 2014
1 parent 580d8aa commit e955b69
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions lib/Mojo/Collection.pm
Expand Up @@ -287,6 +287,15 @@ Alias for L<Mojo::Base/"tap">.
Create a new collection without duplicate elements.
=head1 AUTOLOAD
In addition to the L</"METHODS"> above, you can also call methods provided by
all elements in the collection directly and create a new collection from the
results, similar to L</"pluck">.
push @$collection, Mojo::DOM->new("<div><h1>$_</h1></div>") for 1 .. 9;
say $collection->find('h1')->type('h2')->prepend_content('Test ')->root;
=head1 OPERATORS
L<Mojo::Collection> overloads the following operators.
Expand All @@ -303,15 +312,6 @@ Always true.
Stringify elements in collection and L</"join"> them with newlines.
=head1 AUTOLOAD
In addition to the L</"METHODS"> above, you can also call methods provided by
all elements in the collection directly and create a new collection from the
results, similar to L</"pluck">.
push @$collection, Mojo::DOM->new("<div><h1>$_</h1></div>") for 1 .. 9;
say $collection->find('h1')->type('h2')->prepend_content('Test ')->root;
=head1 SEE ALSO
L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>.
Expand Down
20 changes: 10 additions & 10 deletions lib/Mojo/DOM.pm
Expand Up @@ -789,6 +789,16 @@ Element type.
Disable HTML semantics in parser and activate case sensitivity, defaults to
auto detection based on processing instructions.
=head1 AUTOLOAD
In addition to the L</"METHODS"> above, many child elements are also
automatically available as object methods, which return a L<Mojo::DOM> or
L<Mojo::Collection> object, depending on number of children.
say $dom->p->text;
say $dom->div->[23]->text;
say $dom->div->text;
=head1 OPERATORS
L<Mojo::DOM> overloads the following operators.
Expand All @@ -814,16 +824,6 @@ Alias for L</"attr">.
Alias for L</"to_xml">.
=head1 AUTOLOAD
In addition to the L</"METHODS"> above, many child elements are also
automatically available as object methods, which return a L<Mojo::DOM> or
L<Mojo::Collection> object, depending on number of children.
say $dom->p->text;
say $dom->div->[23]->text;
say $dom->div->text;
=head1 SEE ALSO
L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>.
Expand Down

0 comments on commit e955b69

Please sign in to comment.