Skip to content

Commit

Permalink
fix line length everywhere else
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 24, 2015
1 parent 80fbf18 commit 1e8865f
Show file tree
Hide file tree
Showing 55 changed files with 321 additions and 348 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo.pm
Expand Up @@ -109,8 +109,7 @@ new ones.
my $tx = $app->build_tx;
Transaction builder, defaults to building a L<Mojo::Transaction::HTTP>
object.
Transaction builder, defaults to building a L<Mojo::Transaction::HTTP> object.
=head2 config
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Asset/File.pm
Expand Up @@ -161,8 +161,8 @@ L<Mojo::Asset::File> inherits all events from L<Mojo::Asset>.
=head1 ATTRIBUTES
L<Mojo::Asset::File> inherits all attributes from L<Mojo::Asset> and
implements the following new ones.
L<Mojo::Asset::File> inherits all attributes from L<Mojo::Asset> and implements
the following new ones.
=head2 cleanup
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Asset/Memory.pm
Expand Up @@ -77,8 +77,8 @@ L<Mojo::Asset::Memory> is an in-memory storage backend for HTTP content.
=head1 EVENTS
L<Mojo::Asset::Memory> inherits all events from L<Mojo::Asset> and can emit
the following new ones.
L<Mojo::Asset::Memory> inherits all events from L<Mojo::Asset> and can emit the
following new ones.
=head2 upgrade
Expand Down
12 changes: 6 additions & 6 deletions lib/Mojo/Base.pm
Expand Up @@ -191,9 +191,9 @@ L<Mojo::Base> implements the following methods.
SubClass->attr([qw(name1 name2 name3)] => sub {...});
Create attribute accessor for hash-based objects, an array reference can be
used to create more than one at a time. Pass an optional second argument to
set a default value, it should be a constant or a callback. The callback will
be executed at accessor read time if there's no set value. Accessors can be
used to create more than one at a time. Pass an optional second argument to set
a default value, it should be a constant or a callback. The callback will be
executed at accessor read time if there's no set value. Accessors can be
chained, that means they return their invocant when they are called with an
argument.
Expand All @@ -212,9 +212,9 @@ pass it either a hash or a hash reference with attribute values.
$object = $object->tap($method);
$object = $object->tap($method, @args);
K combinator, tap into a method chain to perform operations on an object
within the chain. The object will be the first argument passed to the callback
and is also available as C<$_>.
K combinator, tap into a method chain to perform operations on an object within
the chain. The object will be the first argument passed to the callback and is
also available as C<$_>.
# Longer version
$object = $object->tap(sub { $_->$method(@args) });
Expand Down
7 changes: 3 additions & 4 deletions lib/Mojo/ByteStream.pm
Expand Up @@ -89,8 +89,8 @@ Mojo::ByteStream - ByteStream
=head1 DESCRIPTION
L<Mojo::ByteStream> is a scalar-based container for bytestreams that provides
a more friendly API for many of the functions in L<Mojo::Util>.
L<Mojo::ByteStream> is a scalar-based container for bytestreams that provides a
more friendly API for many of the functions in L<Mojo::Util>.
# Access scalar directly to manipulate bytestream
my $stream = Mojo::ByteStream->new('foo');
Expand Down Expand Up @@ -296,8 +296,7 @@ Alias for L<Mojo::Base/"tap">.
$stream = $stream->term_escape;
Escape POSIX control characters in bytestream with
L<Mojo::Util/"term_escape">.
Escape POSIX control characters in bytestream with L<Mojo::Util/"term_escape">.
# Print binary checksum to terminal
b('foo')->sha1_bytes->term_escape->say;
Expand Down
10 changes: 5 additions & 5 deletions lib/Mojo/Collection.pm
Expand Up @@ -211,8 +211,8 @@ all elements.
Evaluate regular expression or callback for each element in collection and
create a new collection with all elements that matched the regular expression,
or for which the callback returned true. The element will be the first
argument passed to the callback and is also available as C<$_>.
or for which the callback returned true. The element will be the first argument
passed to the callback and is also available as C<$_>.
# Find all values that contain the word "mojo"
my $interesting = $collection->grep(qr/mojo/i);
Expand Down Expand Up @@ -242,9 +242,9 @@ Return the last element in collection.
my $new = $collection->map($method);
my $new = $collection->map($method, @args);
Evaluate callback for, or call method on, each element in collection and
create a new collection from the results. The element will be the first
argument passed to the callback and is also available as C<$_>.
Evaluate callback for, or call method on, each element in collection and create
a new collection from the results. The element will be the first argument
passed to the callback and is also available as C<$_>.
# Longer version
my $new = $collection->map(sub { $_->$method(@args) });
Expand Down
12 changes: 6 additions & 6 deletions lib/Mojo/Content.pm
Expand Up @@ -435,8 +435,8 @@ Skip body parsing and finish after headers.
=head1 METHODS
L<Mojo::Content> inherits all methods from L<Mojo::EventEmitter> and
implements the following new ones.
L<Mojo::Content> inherits all methods from L<Mojo::EventEmitter> and implements
the following new ones.
=head2 body_contains
Expand Down Expand Up @@ -522,8 +522,8 @@ Check if content is gzip compressed.
my $bool = $content->is_dynamic;
Check if content will be dynamically generated, which prevents L</"clone">
from working.
Check if content will be dynamically generated, which prevents L</"clone"> from
working.
=head2 is_finished
Expand Down Expand Up @@ -579,8 +579,8 @@ Size of content already received from message in bytes.
$content = $content->write($bytes);
$content = $content->write($bytes => sub {...});
Write dynamic content non-blocking, the optional drain callback will be
invoked once all data has been written.
Write dynamic content non-blocking, the optional drain callback will be invoked
once all data has been written.
=head2 write_chunk
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Content/Single.pm
Expand Up @@ -75,8 +75,8 @@ L<RFC 7231|http://tools.ietf.org/html/rfc7231>.
=head1 EVENTS
L<Mojo::Content::Single> inherits all events from L<Mojo::Content> and can
emit the following new ones.
L<Mojo::Content::Single> inherits all events from L<Mojo::Content> and can emit
the following new ones.
=head2 upgrade
Expand Down
22 changes: 11 additions & 11 deletions lib/Mojo/DOM.pm
Expand Up @@ -597,8 +597,8 @@ All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
my $collection = $dom->following('div > p');
Find all sibling elements after this node matching the CSS selector and return
a L<Mojo::Collection> object containing these elements as L<Mojo::DOM>
objects. All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
a L<Mojo::Collection> object containing these elements as L<Mojo::DOM> objects.
All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
# List types of sibling elements after this node
say $dom->following->map('type')->join("\n");
Expand Down Expand Up @@ -654,8 +654,8 @@ fragment if necessary.
my $sibling = $dom->next;
Return L<Mojo::DOM> object for next sibling element or C<undef> if there are
no more siblings.
Return L<Mojo::DOM> object for next sibling element or C<undef> if there are no
more siblings.
# "<h2>123</h2>"
$dom->parse('<div><h1>Test</h1><h2>123</h2></div>')->at('h1')->next;
Expand Down Expand Up @@ -686,8 +686,8 @@ C<root>, C<tag> or C<text>.
my $parent = $dom->parent;
Return L<Mojo::DOM> object for parent of this node or C<undef> if this node
has no parent.
Return L<Mojo::DOM> object for parent of this node or C<undef> if this node has
no parent.
=head2 parse
Expand All @@ -703,9 +703,9 @@ Parse HTML/XML fragment with L<Mojo::DOM::HTML>.
my $collection = $dom->preceding;
my $collection = $dom->preceding('div > p');
Find all sibling elements before this node matching the CSS selector and
return a L<Mojo::Collection> object containing these elements as L<Mojo::DOM>
objects. All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
Find all sibling elements before this node matching the CSS selector and return
a L<Mojo::Collection> object containing these elements as L<Mojo::DOM> objects.
All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
# List types of sibling elements before this node
say $dom->preceding->map('type')->join("\n");
Expand Down Expand Up @@ -738,8 +738,8 @@ Prepend HTML/XML fragment to this node.
$dom = $dom->prepend_content('<p>I ♥ Mojolicious!</p>');
Prepend HTML/XML fragment (for C<root> and C<tag> nodes) or raw content to
this node's content.
Prepend HTML/XML fragment (for C<root> and C<tag> nodes) or raw content to this
node's content.
# "<div><h2>Test123</h2></div>"
$dom->parse('<div><h2>123</h2></div>')
Expand Down
11 changes: 5 additions & 6 deletions lib/Mojo/DOM/CSS.pm
Expand Up @@ -360,13 +360,13 @@ EXPERIMENTAL and might change without warning!
my $case_insensitive = $css->select('input[class~="foo" i]');
This selector is part of
L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a
work in progress.
L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a work
in progress.
=head2 E[foo~="bar"]
An C<E> element whose C<foo> attribute value is a list of
whitespace-separated values, one of which is exactly equal to C<bar>.
An C<E> element whose C<foo> attribute value is a list of whitespace-separated
values, one of which is exactly equal to C<bar>.
my $foo = $css->select('input[class~="foo"]');
my $foo = $css->select('input[class~=foo]');
Expand Down Expand Up @@ -572,8 +572,7 @@ Run CSS selector against L</"tree">.
my $result = $css->select_one('head > title');
Run CSS selector against L</"tree"> and stop as soon as the first node
matched.
Run CSS selector against L</"tree"> and stop as soon as the first node matched.
=head1 SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/DOM/HTML.pm
Expand Up @@ -288,8 +288,8 @@ Mojo::DOM::HTML - HTML/XML engine
=head1 DESCRIPTION
L<Mojo::DOM::HTML> is the HTML/XML engine used by L<Mojo::DOM> and based on
the L<HTML Living Standard|https://html.spec.whatwg.org> as well as the
L<Mojo::DOM::HTML> is the HTML/XML engine used by L<Mojo::DOM> and based on the
L<HTML Living Standard|https://html.spec.whatwg.org> as well as the
L<Extensible Markup Language (XML) 1.0|http://www.w3.org/TR/xml/>.
=head1 ATTRIBUTES
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/EventEmitter.pm
Expand Up @@ -112,8 +112,8 @@ class but is fatal if unhandled.
=head1 METHODS
L<Mojo::EventEmitter> inherits all methods from L<Mojo::Base> and
implements the following new ones.
L<Mojo::EventEmitter> inherits all methods from L<Mojo::Base> and implements
the following new ones.
=head2 catch
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/HelloWorld.pm
Expand Up @@ -22,8 +22,8 @@ Mojo::HelloWorld - Hello World!
=head1 DESCRIPTION
L<Mojo::HelloWorld> is the default L<Mojolicious> application, used mostly
for testing.
L<Mojo::HelloWorld> is the default L<Mojolicious> application, used mostly for
testing.
=head1 SEE ALSO
Expand Down
33 changes: 16 additions & 17 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -281,9 +281,9 @@ Mojo::IOLoop - Minimalistic event loop
=head1 DESCRIPTION
L<Mojo::IOLoop> is a very minimalistic event loop based on L<Mojo::Reactor>,
it has been reduced to the absolute minimal feature set required to build
solid and scalable non-blocking TCP clients and servers.
L<Mojo::IOLoop> is a very minimalistic event loop based on L<Mojo::Reactor>, it
has been reduced to the absolute minimal feature set required to build solid
and scalable non-blocking TCP clients and servers.
Depending on operating system, the default per-process and system-wide file
descriptor limits are often very low and need to be tuned for better
Expand All @@ -299,8 +299,8 @@ scalable C<select>.
The event loop will be resilient to time jumps if a monotonic clock is
available through L<Time::HiRes>. A TLS certificate and key are also built
right in, to make writing test servers as easy as possible. Also note that for
convenience the C<PIPE> signal will be set to C<IGNORE> when L<Mojo::IOLoop>
is loaded.
convenience the C<PIPE> signal will be set to C<IGNORE> when L<Mojo::IOLoop> is
loaded.
For better scalability (epoll, kqueue) and to provide non-blocking name
resolution, SOCKS5 as well as TLS support, the optional modules L<EV> (4.0+),
Expand All @@ -313,8 +313,8 @@ See L<Mojolicious::Guides::Cookbook/"REAL-TIME WEB"> for more.
=head1 EVENTS
L<Mojo::IOLoop> inherits all events from L<Mojo::EventEmitter> and can emit
the following new ones.
L<Mojo::IOLoop> inherits all events from L<Mojo::EventEmitter> and can emit the
following new ones.
=head2 finish
Expand All @@ -336,8 +336,8 @@ L<Mojo::IOLoop> implements the following attributes.
$loop = $loop->max_accepts(1000);
The maximum number of connections this event loop is allowed to accept before
shutting down gracefully without interrupting existing connections, defaults
to C<0>. Setting the value to C<0> will allow this event loop to accept new
shutting down gracefully without interrupting existing connections, defaults to
C<0>. Setting the value to C<0> will allow this event loop to accept new
connections indefinitely. Note that up to half of this value can be subtracted
randomly to improve load balancing between multiple server processes.
Expand All @@ -347,8 +347,7 @@ randomly to improve load balancing between multiple server processes.
$loop = $loop->max_connections(1000);
The maximum number of concurrent connections this event loop is allowed to
handle before stopping to accept new incoming connections, defaults to
C<1000>.
handle before stopping to accept new incoming connections, defaults to C<1000>.
=head2 multi_accept
Expand Down Expand Up @@ -415,10 +414,10 @@ L<Mojo::IOLoop::Client/"connect">.
my $delay = $loop->delay(sub {...});
my $delay = $loop->delay(sub {...}, sub {...});
Build L<Mojo::IOLoop::Delay> object to manage callbacks and control the flow
of events for this event loop, which can help you avoid deep nested closures
and memory leaks that often result from continuation-passing style. Callbacks
will be passed along to L<Mojo::IOLoop::Delay/"steps">.
Build L<Mojo::IOLoop::Delay> object to manage callbacks and control the flow of
events for this event loop, which can help you avoid deep nested closures and
memory leaks that often result from continuation-passing style. Callbacks will
be passed along to L<Mojo::IOLoop::Delay/"steps">.
# Synchronize multiple events
my $delay = Mojo::IOLoop->delay(sub { say 'BOOM!' });
Expand Down Expand Up @@ -560,8 +559,8 @@ as L<Mojo::IOLoop::Server/"listen">.
my $loop = Mojo::IOLoop->singleton;
The global L<Mojo::IOLoop> singleton, used to access a single shared event
loop object from everywhere inside the process.
The global L<Mojo::IOLoop> singleton, used to access a single shared event loop
object from everywhere inside the process.
# Many methods also allow you to take shortcuts
Mojo::IOLoop->timer(2 => sub { Mojo::IOLoop->stop });
Expand Down

0 comments on commit 1e8865f

Please sign in to comment.