line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Events::Dispatcher; |
2
|
1
|
|
|
1
|
|
6
|
use Mojo::Base 'Mojo::EventEmitter'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1580
|
use Mojo::Server; |
|
1
|
|
|
|
|
36997
|
|
|
1
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has 'app' => sub { Mojo::Server->new->build_app('Mojo::HelloWorld') }; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head2 new |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Initialize dispatched and startup listeners |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
0
|
|
|
0
|
1
|
|
my $self = shift->SUPER::new(@_); |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
$self->app->listeners->startup($self); |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 dispatch |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Dispatch event |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub dispatch { |
29
|
0
|
|
|
0
|
1
|
|
return shift->emit(@_); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |