blib/lib/AproJo/Front.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 5 | 8 | 62.5 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 2 | 3 | 66.6 |
pod | 0 | 2 | 0.0 |
total | 7 | 15 | 46.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package AproJo::Front; | ||||||
2 | 2 | 2 | 10630 | use Mojo::Base 'Mojolicious::Controller'; | |||
2 | 5 | ||||||
2 | 9 | ||||||
3 | |||||||
4 | # This action will render a template | ||||||
5 | sub index { | ||||||
6 | 5 | 5 | 0 | 28070 | my $self = shift; | ||
7 | |||||||
8 | # Render template "front/index.html.ep" | ||||||
9 | 5 | 30 | $self->render(); | ||||
10 | } | ||||||
11 | |||||||
12 | sub page { | ||||||
13 | 0 | 0 | 0 | my $self = shift; | |||
14 | |||||||
15 | 0 | my $name = $self->param('name'); | |||||
16 | |||||||
17 | # Render $page | ||||||
18 | 0 | 0 | $self->render_not_found | ||||
19 | unless $self->render(template => "front/$name"); | ||||||
20 | } | ||||||
21 | |||||||
22 | 1; |