Skip to content

Commit

Permalink
mention return values
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 21, 2015
1 parent ff23a45 commit d1b9ff5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
20 changes: 10 additions & 10 deletions lib/Mojo/DOM.pm
Expand Up @@ -533,8 +533,8 @@ node's content.
my $result = $dom->at('div ~ p');
Find first descendant element of this element matching the CSS selector and
return it as a L<Mojo::DOM> object or return C<undef> if none could be found.
All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
return it as a L<Mojo::DOM> object, or C<undef> if none could be found. All
selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
# Find first element with "svg" namespace definition
my $namespace = $dom->at('[xmlns\:svg]')->{'xmlns:svg'};
Expand Down Expand Up @@ -690,7 +690,7 @@ L<Mojo::DOM::CSS/"SELECTORS"> are supported.
my $namespace = $dom->namespace;
Find this element's namespace or return C<undef> if none could be found.
Find this element's namespace, or return C<undef> if none could be found.
# Find namespace for an element with namespace prefix
my $namespace = $dom->at('svg > svg\:circle')->namespace;
Expand All @@ -710,7 +710,7 @@ fragment if necessary.
my $sibling = $dom->next;
Return L<Mojo::DOM> object for next sibling element or C<undef> if there are no
Return L<Mojo::DOM> object for next sibling element, or C<undef> if there are no
more siblings.
# "<h2>123</h2>"
Expand All @@ -720,7 +720,7 @@ more siblings.
my $sibling = $dom->next_node;
Return L<Mojo::DOM> object for next sibling node or C<undef> if there are no
Return L<Mojo::DOM> object for next sibling node, or C<undef> if there are no
more siblings.
# "456"
Expand All @@ -735,7 +735,7 @@ more siblings.
my $parent = $dom->parent;
Return L<Mojo::DOM> object for parent of this node or C<undef> if this node has
Return L<Mojo::DOM> object for parent of this node, or C<undef> if this node has
no parent.
# "<b><i>Test</i></b>"
Expand Down Expand Up @@ -808,7 +808,7 @@ node's content.
my $sibling = $dom->previous;
Return L<Mojo::DOM> object for previous sibling element or C<undef> if there
Return L<Mojo::DOM> object for previous sibling element, or C<undef> if there
are no more siblings.
# "<h1>Test</h1>"
Expand All @@ -818,7 +818,7 @@ are no more siblings.
my $sibling = $dom->previous_node;
Return L<Mojo::DOM> object for previous sibling node or C<undef> if there are
Return L<Mojo::DOM> object for previous sibling node, or C<undef> if there are
no more siblings.
# "123"
Expand Down Expand Up @@ -954,9 +954,9 @@ C<root>, C<tag> or C<text>.
my $value = $dom->val;
Extract value from form element (such as C<button>, C<input>, C<option>,
C<select> and C<textarea>) or return C<undef> if this element has no value. In
C<select> and C<textarea>), or return C<undef> if this element has no value. In
the case of C<select> with C<multiple> attribute, find C<option> elements with
C<selected> attribute and return an array reference with all values or C<undef>
C<selected> attribute and return an array reference with all values, or C<undef>
if none could be found.
# "a"
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo.pm
Expand Up @@ -167,7 +167,7 @@ the following new ones.
my $file = $morbo->check;
Check if file from L</"watch"> has been modified since last check and return
its name or C<undef> if there have been no changes.
its name, or C<undef> if there have been no changes.
=head2 run
Expand Down
9 changes: 5 additions & 4 deletions lib/Mojo/Template.pm
Expand Up @@ -621,14 +621,15 @@ Build Perl L</"code"> from L</"tree">.
my $exception = $mt->compile;
Compile Perl L</"code"> for template.
Compile Perl L</"code"> for template and return a L<Mojo::Exception> object, or
C<undef> if there was no exception.
=head2 interpret
my $output = $mt->interpret;
my $output = $mt->interpret(@args);
Interpret L</"compiled"> template code.
Interpret L</"compiled"> template code and return the result.
# Reuse template
say $mt->render('Hello <%= $_[0] %>!', 'Bender');
Expand All @@ -646,7 +647,7 @@ Parse template into L</"tree">.
my $output = $mt->render('<%= 1 + 1 %>');
my $output = $mt->render('<%= shift() + shift() %>', @args);
Render template.
Render template and return the result.
say $mt->render('Hello <%= $_[0] %>!', 'Bender');
Expand All @@ -655,7 +656,7 @@ Render template.
my $output = $mt->render_file('/tmp/foo.mt');
my $output = $mt->render_file('/tmp/foo.mt', @args);
Render template file.
Render template file and return the result.
=head1 DEBUGGING
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -549,7 +549,7 @@ Convert C<CamelCase> string to C<snake_case> and replace C<::> with C<->.
my $chars = decode 'UTF-8', $bytes;
Decode bytes to characters and return C<undef> if decoding failed.
Decode bytes to characters, or return C<undef> if decoding failed.
=head2 deprecated
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Commands.pm
Expand Up @@ -302,7 +302,7 @@ implements the following new ones.
my $env = $commands->detect;
Try to detect environment or return C<undef> if none could be detected.
Try to detect environment, or return C<undef> if none could be detected.
=head2 run
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Renderer.pm
Expand Up @@ -396,7 +396,7 @@ handlers.
my $helper = $renderer->get_helper('url_for');
Get a helper by full name, generate a helper dynamically for a prefix or return
Get a helper by full name, generate a helper dynamically for a prefix, or return
C<undef> if no helper or prefix could be found. Generated helpers return a
proxy object containing the current controller object and on which nested
helpers can be called.
Expand Down

0 comments on commit d1b9ff5

Please sign in to comment.