I am in the process of updating the AutoRunmode plugin to use the new
hook interface.
Unfortunately, it seems that CGI::App prerun will always run after all
the hooks. I am not sure how to resolve this without requiring
additional hooks
such as 'after_prerun'.
I will probably just point out the problem in
the documentation and advise the users of the non-elegant work-around.
The problem only occurs in the presence of a prerun method that
actually changes the runmode.
I think that is a good solution and may be a "good enough" solution.
Let's see.
OK.
http://search.cpan.org/~thilo/CGI-Application-Plugin-AutoRunmode-0.06/
AutoRunmode.pm
The new version, which by using the hook interface in CGI::App 4,
becomes as simple to use as
package MyApp;
use base 'CGI::Application';
use CGI::Application::Plugin::AutoRunmode;
sub my_run_mode : Runmode {
# do something here
}
sub another_run_mode : Runmode {
# do something else
}
# you now have two run modes
# "my_run_mode" and "another_run_mode"
(no need to import a cgiapp_prerun method anymore, this is done via a
hook now).
The module is also compatible with CGI::App 3.x (exporting
cgiapp_prerun is still supported).
Cheers,
Thilo
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]