[cgiapp] Incompatibility between CAP::Authentication and CAP::ActionDispatch

Christian Walde walde.christian at googlemail.com
Thu Jun 3 13:54:45 EDT 2010


On Wed, 02 Jun 2010 13:58:26 +0200, Nicholas Bamber <nicholas at periapt.co.uk> wrote:

> There is a long standing bug report (39772
> <https://rt.cpan.org/Ticket/Display.html?id=39772>) about
> incompatibility between these two modules. Christian Walde recently
> contacted me via github over the same issue. I can reproduce the issue,
> and I have a test script to cover the case. So I will apply Christian's
> suggested changes at least to the developer release.
>
> However the more I look at it the more annoyed I am by ActionDispatch.
>
> 1.) There is some sloppy code in ActionDispatch that is documented in
> 41345 <https://rt.cpan.org/Ticket/Display.html?id=41345>.
> 2.) Some of the code is handled in the init callback and some in the
> prerun callback. If it was all handled in the init callback then there
> would be no need to change the Authentication module.
> 3.) ActionDispatch does not seem to have been changed in two years. Does
> that make it mature or orphaned?
> 4.) AutoRunmode offers similar functionality but does not seem to have
> the same problem.
>

Some history on that: I don't claim to be an expert at CGI::App or any related software whatsoever. What happened was this:

I wrote a smallish webapp for my own purposes in December, starting out with little to no previous knowledge using CGI::App. I quickly realized that i didn't like the need to manually declare the runmodes in the setup so i looked for plugins that could do that. I looked at AD and AutoRunmode, and for reasons i cannot recall decided for AD.

I was at that time and until Nicholas mentioned it, unaware of C::A::Dispatch, which seems to do everything AD does and more, only with less syntax sugar extensions and instead a central list of path matches. (Please someone correct me if I am wrong.)

As the app grew i decided in April that I'd like to have some sort of user management in the future and experimented with adding CAP::Auth to it and soon noticed that Auth and AD didn't play well with each other. As such, i looked at how i could fix that and found the quickest way to do that to be a change in Auth. I forked the repo on github in order to keep a history of it, applied my changes, installed it on my machines and everything was good.

I played with the thought of asking maintainers to take in the patch, but decided to wait because it didn't seem a particularly important patch and because i didn't have any chance to actually test it in a live environment yet. (i.e. with actual users)

Fast-Forward to last saturday. Nicholas contacts me about my commits to my branch, starts looking at how they fit in with things and mentions to me that he'd never use AD, and also mentions C::A::Dispatch. I've now looked at CAD in a cursory manner and am thinking that it really makes AD unnecessary.

If my conclusion in that is right and the quality of AD is actually not as high as a widely used module should be, then I think it'd be pointless to try and make Auth compatible with it, and instead an incompatibility note pointing at CAD in the Auth documentation would be more useful.

-- 
With regards,
Christian Walde


More information about the cgiapp mailing list