add files
|
1 |
package Mojolicious::Plugin::AutoRoute::Util; |
2 | ||
3 |
use strict; |
|
4 |
use warnings; |
|
5 |
use base 'Exporter'; |
|
6 | ||
7 |
our @EXPORT_OK = ('template'); |
|
8 | ||
9 |
sub template { |
|
10 |
my $template = shift; |
|
11 |
|
|
12 |
return sub { |
|
13 |
my $self = shift; |
|
14 |
$self->render($template, 'mojo.maybe' => 1); |
|
15 |
$self->stash('mojo.finished') ? undef : $self->render_not_found; |
|
16 |
}; |
|
17 |
} |
|
18 | ||
19 |
1; |