[cgiapp] Proposal: Change CGI::Snapp's base class from Hash::FieldHash to Moos (sic)
Mark Stosberg
mark at summersault.com
Tue Nov 20 20:49:20 EST 2012
> I am planning to change CGI::Snapp's base class from Hash::FieldHash to
> Moos (sic).
I would definitely support using one of the Moose-compatible projects. I
am thinking of moving PSGI::Application from Any::Moose to Moo.
I looked at 'Moos' a bit as well. I factored in that Moo has quickly
traction and has a number of extensions and users already, while Mouse
appears to have lost steam, and Moos appears to have a rather small user
base at this point as well.
> Unifying them has other benefits, since I have some modules which will
> dove-tail nicely by switching to Moos as well:
>
> o Local::Config. This loads a config file per project. It wraps
> File::HomeDir to load a file using the project's name.
>
> o Local::Logger, which uses the project-specific dbh from
> Local::Connector, since my projects all log to a db.
>
> o Local::Connector. This uses Local::Config's per project file to wrap
> DBIx::Connector to create a project-specific dbh.
I'll be interested to see these. In parallel, I've been developing Moose
roles for PSGI::App for config file loading, logging and databas access.
What I have now is for Moose and a bit project-specific, but I plan to
make CPAN-ready Moo-based variants at some point.
I wrote more about the config role here, and posted a link to some
similar code:
http://www.modernperlbooks.com/mt/2012/11/the-curious-case-of-the-justifiable-but-slow-singleton.html#comment-1768
My Database role integrates with DBIx::Simple currently. Eventually, I
would like to switch transactions to use DBIx::Connector as well.
Mark
More information about the cgiapp
mailing list