Mark Stosberg wrote:
On Mon, 29 Sep 2008 00:18:02 +0100
Richard Jones <[EMAIL PROTECTED]> wrote:
Mark Stosberg wrote:
As Rhesa proposed, he has followed through and released a plugin to add the
Devel::Declare / Method::Signatures magic to CGI::Application:
http://search.cpan.org/perldoc?CGI::Application::Plugin::RunmodeDeclare
Looks like an interesting alternative to CAP::AutoRunmode. One minor
irritant is having to put 'runmode foo ($c:)' everywhere (only if using
$c instead of $self of course). Might be useful to be able to declare
use CGI::Application::Plugin::RunmodeDeclare(invocant => '$c'), or just
use CAP::RunmodeDeclare qw($c).
I agree with this sentiment.
This brings back to life the discussion we were having on IRC the other
day about "$self" vs "$c".
While I agree with the others about preferring $self, it doesn't hurt to have
the option. The next release will allow you to say:
use CGI::Application::Plugin::RunmodeDeclare invocant => '$c';
As for the order in which arguments are fetched, I don't mind swapping
$self->param and $q->param in the fallback order. I don't have a practical use
case either way. I only use $self->param in this context when CA::Dispatch
puts url components there. I thought you might sometimes want to override a
url component with a form field, but I haven't seen that happen yet.
Method::Signatures now respects code attributes. I'm going to try and see if I
can make it easier to reuse mschwern's code, so I don't have to copy/paste his
stuff every time he changes something. I'd very much like to be able to use
the same signature features.
rhesa
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################