line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojo::HelloWorld; |
2
|
4
|
|
|
4
|
|
493
|
use Mojo::Base 'Mojolicious'; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
29
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
sub startup { |
5
|
23
|
|
|
23
|
1
|
55
|
my $self = shift; |
6
|
23
|
|
|
|
|
81
|
$self->preload_namespaces([])->log->level('error')->path(undef); |
7
|
23
|
|
|
|
|
66
|
$self->routes->any('/*whatever' => {whatever => '', text => 'Your Mojo is working!'}); |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
1; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=encoding utf8 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Mojo::HelloWorld - Hello World! |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use Mojo::HelloWorld; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $hello = Mojo::HelloWorld->new; |
23
|
|
|
|
|
|
|
$hello->start; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
L is the default L application, used mostly for testing. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
L inherits all attributes from L. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 METHODS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
L inherits all methods from L and implements the following new ones. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 startup |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
$hello->startup; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Creates a catch-all route that renders a text message. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SEE ALSO |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
L, L, L. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |