[Catalyst] CGI::State style Plugin?

Ash Berlin ash_cpan at firemirror.com
Fri Feb 9 21:40:24 GMT 2007


Jim Spath wrote:
> I was considering using the following module in my Catalyst app.
> 
> http://search.cpan.org/~dkubb/CGI-State-0.02/State.pm
> 
> Until I saw that it does a "use CGI;", the only purpose of which is for 
> the creation of a CGI object if you don't pass one in.
> 
> So I went ahead and wrote a plugin for Catalyst that provides the same 
> functionality using $c->request.  This was partially because I want the 
> functionality that CGI::State provides and partially to learn a little 
> more about Catalyst.
> 
> I had a few questions about it:
> 
> - Should I call it Catalyst::Plugin::CGI::State or something else?  I 
> was thinking of something like Catalyst::Plugin::StructureParams, but I 
> wasn't sure since it's based so heavily off CGI::State.  On the other 
> hand, it doesn't use CGI or CGI::State anymore.
> 
> - It would most likely provide two methods
>     my $structure = $c->params_to_structure;
>     $c->structure_to_params($structure)
>   Do these names make sense?  Are they acceptable?
> 
> - Does anyone think this plugin is worth releasing publicly?
> 
> Thanks!
> - Jim

Have you looked at Catalyst::Plugin::Params::Nested to see if that does 
what you want first?

Ash



More information about the Catalyst mailing list