[cgiapp] New Plugin: RunmodeDeclare

George Hartzell hartzell at alerce.com
Thu Oct 2 23:30:38 EDT 2008


Mark Stosberg writes:
 > 
 > 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
 > 
 > Used in combination with Method::Signatures, this approach can noticably shorten
 > the amount of code you need to write, shrinking your 'setup()' routine and reducing
 > "busy work" of writing "my $self = shift;" and unpacking other parameters. 
 > 
 > For a comparison, I refactored the simple "widget" example from the
 > CGI::Application documentation. The result was about 15% fewer lines of code.
 > 
 > Take a look for yourself at the RunmodeDeclare plugin
 > [...]

I haven't had time to go and try it out [yet], but I'm curious.

If I have something like this:

  startmode begin { "Here" }

and I'm running my app under perl -d, can I set a breakpoint in the
sub named begin, or is there magic happening that means that there's
no actual sub named begin?

g.




More information about the cgiapp mailing list