| 1 | package Mojo::Events::Listener; | ||
| 2 | 1 | ▶ | use Mojo::Base -base; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 1 | ▶ | use Mojo::Server; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 0 | ▶ | has app => sub { Mojo::Server->new->build_app('Mojo::HelloWorld') }, weak => 1; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 7 | 1 | has event => 'default'; | |
| 8 | |||
| 9 | =head2 handle | ||
| 10 | |||
| 11 | Handle event | ||
| 12 | |||
| 13 | =cut | ||
| 14 | |||
| 15 | 0 | ▶ | sub handle { |
|
Subroutine
handle: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 16 | 0 | return shift->handler(@_); | |
| 17 | } | ||
| 18 | |||
| 19 | =head2 handler | ||
| 20 | |||
| 21 | Define the handler | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | 0 | ▶ | sub handler { |
|
Subroutine
handler: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 26 | 0 | warn "Implement in subclass." | |
| 27 | } | ||
| 28 | |||
| 29 | 1 | 1; | |