File: myapp.pl

package info (click to toggle)
libbusiness-paypal-api-perl 0.77-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 488 kB
  • sloc: perl: 2,503; makefile: 9
file content (24 lines) | stat: -rwxr-xr-x 456 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl
use Mojolicious::Lite;

# You can spin this up when testing t/advanced in order to avoid 404s

get '/' => sub {
    my $c = shift;
    $c->render( template => 'index' );
};

app->start;
__DATA__

@@ index.html.ep
% layout 'default';
% title 'Welcome';
Welcome to the Mojolicious real-time web framework!

@@ layouts/default.html.ep
<!DOCTYPE html>
<html>
  <head><title><%= title %></title></head>
  <body><%= content %></body>
</html>