Navigation Menu

Skip to content

Commit

Permalink
document error event in Mojo::EventEmitter
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 2, 2013
1 parent fd5c755 commit 7851e9b
Show file tree
Hide file tree
Showing 18 changed files with 58 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,4 +1,7 @@

3.72 2013-01-03
- Improved documentation.

3.71 2013-01-02
- Modernized ".travis.yml".
- Improved Mojo::EventEmitter to warn about unhandled error events.
Expand Down
4 changes: 4 additions & 0 deletions lib/Mojo/Asset.pm
Expand Up @@ -40,6 +40,10 @@ Mojo::Asset - HTTP content storage base class
L<Mojo::Asset> is an abstract base class for HTTP content storage.
=head1 EVENTS
L<Mojo::Asset> inherits all events from L<Mojo::EventEmitter>.
=head1 ATTRIBUTES
L<Mojo::Asset> implements the following attributes.
Expand Down
4 changes: 4 additions & 0 deletions lib/Mojo/Asset/File.pm
Expand Up @@ -165,6 +165,10 @@ Mojo::Asset::File - File storage for HTTP content
L<Mojo::Asset::File> is a file storage backend for HTTP content.
=head1 EVENTS
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
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Asset/Memory.pm
Expand Up @@ -73,7 +73,8 @@ L<Mojo::Asset::Memory> is an in-memory storage backend for HTTP content.
=head1 EVENTS
L<Mojo::Asset::Memory> can emit the following events.
L<Mojo::Asset::Memory> inherits all events from L<Mojo::Asset> and can emit
the following new ones.
=head2 C<upgrade>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Content.pm
Expand Up @@ -363,7 +363,8 @@ RFC 2616.
=head1 EVENTS
L<Mojo::Content> can emit the following events.
L<Mojo::Content> inherits all events from L<Mojo::EventEmitter> and can emit
the following new ones.
=head2 C<body>
Expand Down
18 changes: 18 additions & 0 deletions lib/Mojo/EventEmitter.pm
Expand Up @@ -115,6 +115,24 @@ Mojo::EventEmitter - Event emitter base class
L<Mojo::EventEmitter> is a simple base class for event emitting objects.
=head1 EVENTS
L<Mojo::EventEmitter> can emit the following events.
=head2 C<error>
$e->on(error => sub {
my ($e, $err) = @_;
...
});
Emitted safely for event errors.
$e->on(error => sub {
my ($e, $err) = @_;
say "This looks bad: $err";
});
=head1 METHODS
L<Mojo::EventEmitter> inherits all methods from L<Mojo::Base> and
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/IOLoop/Client.pm
Expand Up @@ -165,7 +165,8 @@ L<Mojo::IOLoop::Client> opens TCP connections for L<Mojo::IOLoop>.
=head1 EVENTS
L<Mojo::IOLoop::Client> can emit the following events.
L<Mojo::IOLoop::Client> inherits all events from L<Mojo::EventEmitter> and can
emit the following new ones.
=head2 C<connect>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/IOLoop/Delay.pm
Expand Up @@ -109,7 +109,8 @@ L<Mojo::IOLoop::Delay> controls the flow of events for L<Mojo::IOLoop>.
=head1 EVENTS
L<Mojo::IOLoop::Delay> can emit the following events.
L<Mojo::IOLoop::Delay> inherits all events from L<Mojo::EventEmitter> and can
emit the following new ones.
=head2 C<finish>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/IOLoop/Server.pm
Expand Up @@ -182,7 +182,8 @@ L<Mojo::IOLoop::Server> accepts TCP connections for L<Mojo::IOLoop>.
=head1 EVENTS
L<Mojo::IOLoop::Server> can emit the following events.
L<Mojo::IOLoop::Server> inherits all events from L<Mojo::EventEmitter> and can
emit the following new ones.
=head2 C<accept>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/IOLoop/Stream.pm
Expand Up @@ -195,7 +195,8 @@ L<Mojo::IOLoop>.
=head1 EVENTS
L<Mojo::IOLoop::Stream> can emit the following events.
L<Mojo::IOLoop::Stream> inherits all events from L<Mojo::EventEmitter> and can
emit the following new ones.
=head2 C<close>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Log.pm
Expand Up @@ -98,7 +98,8 @@ L<Mojo::Log> is a simple logger for L<Mojo> projects.
=head1 EVENTS
L<Mojo::Log> can emit the following events.
L<Mojo::Log> inherits all events from L<Mojo::EventEmitter> and can emit the
following new ones.
=head2 C<message>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Message.pm
Expand Up @@ -394,7 +394,8 @@ RFC 2616 and RFC 2388.
=head1 EVENTS
L<Mojo::Message> can emit the following events.
L<Mojo::Message> inherits all events from L<Mojo::EventEmitter> and can emit
the following new ones.
=head2 C<finish>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Reactor.pm
Expand Up @@ -62,7 +62,8 @@ L<Mojo::Reactor> is an abstract base class for low level event reactors.
=head1 EVENTS
L<Mojo::Reactor> can emit the following events.
L<Mojo::Reactor> inherits all events from L<Mojo::EventEmitter> and can emit
the following new ones.
=head2 C<error>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Server.pm
Expand Up @@ -80,7 +80,8 @@ L<Mojo::Server> is an abstract HTTP server base class.
=head1 EVENTS
L<Mojo::Server> can emit the following events.
L<Mojo::Server> inherits all events from L<Mojo::EventEmitter> and can emit
the following new ones.
=head2 C<request>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Transaction.pm
Expand Up @@ -101,7 +101,8 @@ L<Mojo::Transaction> is an abstract base class for transactions.
=head1 EVENTS
L<Mojo::Transaction> can emit the following events.
L<Mojo::Transaction> inherits all events from L<Mojo::EventEmitter> and can
emit the following new ones.
=head2 C<connection>
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/UserAgent.pm
Expand Up @@ -596,7 +596,8 @@ See L<Mojolicious::Guides::Cookbook> for more.
=head1 EVENTS
L<Mojo::UserAgent> can emit the following events.
L<Mojo::UserAgent> inherits all events from L<Mojo::EventEmitter> and can emit
the following new ones.
=head2 C<error>
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -38,7 +38,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Rainbow';
our $VERSION = '3.71';
our $VERSION = '3.72';

sub AUTOLOAD {
my $self = shift;
Expand Down
4 changes: 4 additions & 0 deletions lib/Mojolicious/Plugins.pm
Expand Up @@ -80,6 +80,10 @@ Mojolicious::Plugins - Plugin manager
L<Mojolicious::Plugins> is the plugin manager of L<Mojolicious>.
=head1 EVENTS
L<Mojolicious::Plugins> inherits all events from L<Mojo::EventEmitter>.
=head1 ATTRIBUTES
L<Mojolicious::Plugins> implements the following attributes.
Expand Down

0 comments on commit 7851e9b

Please sign in to comment.