| 1 | package Mojolicious::Plugin::Events::Dispatcher; | ||
| 2 | 2 | ▶ | use Mojo::Base 'Mojo::EventEmitter'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 2 | ▶ | use Mojo::Server; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 0 | ▶ | has 'app' => sub { Mojo::Server->new->build_app('Mojo::HelloWorld') }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 7 | |||
| 8 | =head2 new | ||
| 9 | |||
| 10 | Initialize dispatched and startup listeners | ||
| 11 | |||
| 12 | =cut | ||
| 13 | |||
| 14 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 15 | 0 | 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 | 0 | ▶ | sub dispatch { |
|
Subroutine
dispatch: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | 0 | return shift->emit(@_); | |
| 30 | } | ||
| 31 | |||
| 32 | 2 | 1; | |