File: PluginWithEmbeddedApp.pm

package info (click to toggle)
libmojolicious-perl 8.71%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,996 kB
  • sloc: perl: 9,899; makefile: 31; javascript: 1
file content (17 lines) | stat: -rw-r--r-- 311 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package PluginWithEmbeddedApp;
use Mojo::Base 'Mojolicious::Plugin';

sub register {
  my ($self, $app) = @_;
  $app->routes->any('/plugin')->partial(1)->to(PluginWithEmbeddedApp::App::app());
}

package PluginWithEmbeddedApp::App;
use Mojolicious::Lite;

get '/foo';

1;
__DATA__
@@ foo.html.ep
plugin works!\