[cgiapp] Re: catalyst.pl for CGI::App? Yes: Module::Starter::Plugin::CGIApp

Mark Stosberg mark at summersault.com
Wed Jun 18 15:20:33 EDT 2008


On Wed, 2008-06-18 at 14:12 -0500, Mark Stosberg wrote:
> Just today at YAPC, several CGI::App people met in person and was
> saything that something like "catalyst.pl" would be nice for CGI::App.
> Then Perrin mentioned it would be nice to have a Module::Starter plugin
> for CGI::App.  As I (belatedly) just discovered today, we already have
> one!
> 
> Module::Starter::Plugin::CGIApp is on CPAN now. 
> 
> It could be a little clearer how to use it. Here's an example that
> worked for me:
> 
> MODULE_TEMPLATE_DIR=/usr/local/share/perl/5.8.8/Module/Starter/Plugin/CGIApp/templates/  module-starter --plugin Module::Starter::Simple --plugin Module::Starter::Plugin::Template --plugin Module::Starter::Plugin::CGIApp --module=MyApp --author=markstos --email=mark at summersault.com
> 
> This is a nice start, but could be improved in a couple way:
> 
> - The default template directory should work automatically. 
> 
> - "--template_dir" should work as alternative to the env variable, 
> 
> - The plugins shouldn't have to be named. 
> 
> Then, if my author and e-mail are in a config file as the should be,
> that leaves only one argument left: the module name. 
> 
> In summary, this should be possible:
> 
> cgi-app.pl MyApp
> 
> It would also be nice if Module::Starter prompted the user for the
> author in the e-mail if they aren't present, rather than just exiting
> with an error. ( I realize that's not a deficiency of this plugin. ) 

One more point of feedback: 

I thought it would be useful if the application when ahead and created
www/cgi-bin/myapp.cgi 

Ideally, so it could be immediately run and tested. 

    Mark




More information about the cgiapp mailing list