1. Does a plugin have to reside under Dancer::Plugin::MyPlugin? Or, can it be
situated anywhere, like, for example, under app/lib?
2. Is it possible to call a method in the application from within MyPlugin?
Here is what I mean --
In my app.pm, I have a method called
sub opts {
}
I typically set a bunch of template options in the above sub routine, and use
it like so
get '/' => sub {
my $opts = opts();
template 'index', $opts;
};
I am creating plugin that automatically generates a web page like so
return engine('template')->apply_layout($content);
I would like to run `app::opts()`, and pass the $opts to the template from
within the plugin. I am at a loss how to do that.
--
Puneet Kishor
_______________________________________________
Dancer-users mailing list
[email protected]
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users