my $app = Dancer2::Core::App->new(); $app->with_plugins( 'Menu' ); $app->add_route( method => 'get', regexp => '/test', code => sub {return 'hi'}, ); Dancer2::Plugin::Menu::_do_stuff($app);