sub first : StartRunmode { my $self = shift; return $self->forward('second'); }The current AutoRunmode plugin does not support "StartRunmode", but since you really seem to like that feature, I guess I should try to implement it ...
I have put something together now.It works by basically creating a method "start_mode" in your CGI::App subclass that will always return just one name (the name of the StartRunmode).
This means that it will not be possible to mix the class-based :StartRunmode with the traditional instance-based $app->start_mode("new_name").
You will not be able to change the start_mode from an instance script.I think this is an acceptable limitation, and it will be pointed out in the documentation.
While it is unfortunate, it simplifies both the implementation, and more importantly understanding how the implementation works. Trying to mix both styles leads to very complicated situations, and the module documentation would quickly become incomprehensible.
What does work is subclassing. A :StartRunmode in a subclass will be properly recognized.
Also, this simplified approach does not depend on callback_hooks, so that it will work with pretty old versions of CGI::App as well.
Barring objections, I will upload the module to CPAN over the weekend
(the other change is that the method attributes are now case-insensitive).
Thilo
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.