line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojo::Events::Dispatcher; |
2
|
1
|
|
|
1
|
|
8
|
use Mojo::Base 'Mojo::EventEmitter'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1952
|
use Mojo::Server; |
|
1
|
|
|
|
|
44400
|
|
|
1
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has app => sub { Mojo::Server->new->build_app('Mojo::HelloWorld') }, weak => 1; |
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; |