Mojo/HelloWorld.pm

filter: Statementstmt 100% 7 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
startup
1.0
CRAP 1.0
« Mojo/Cookie.pm ↑ Summary Mojolicious/Command/Author/generate.pm »
1 package Mojo::HelloWorld;
2 4 ▶use Mojo::Base 'Mojolicious';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 23 ▶sub startup {
Subroutine startup: called CC=1 SCAR=0.0
Pod documented
5 23 my $self = shift;
6 23 $self->preload_namespaces([])->log->level('error')->path(undef);
7 23 $self->routes->any('/*whatever' => {whatever => '', text => 'Your Mojo is working!'});
8 }
9  
10 4 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<Mojo::HelloWorld> is the default L<Mojolicious> application, used mostly for testing.
28  
29 =head1 ATTRIBUTES
30  
31 L<Mojo::HelloWorld> inherits all attributes from L<Mojolicious>.
32  
33 =head1 METHODS
34  
35 L<Mojo::HelloWorld> inherits all methods from L<Mojolicious> 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<Mojolicious>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
46  
47 =cut
« Mojo/Cookie.pm ↑ Summary Mojolicious/Command/Author/generate.pm »