
mdietrich at cpan
Jun 1, 2009, 6:47 AM
Views: 1603
Permalink
|
Hi, Matt S Trout redirected me to this list to discuss a "new" plugin for Catalyst. But I guess I need to reach back a bit. I surfed on CPAN yesterday and found the module Catalyst::Controller::RateLimit. One of my first thouhgts was, this module should has been written as a plugin, not as a controller because it extends an application with functionality which is neither business logic nor controller actions. I then contacted the author and stated my thoughts. Andrey Kostenko ( http://search.cpan.org/~gugu ) answered that he first wrote it as a plugin, but the list suggested to find another namespace. So he has chosen the Controller namespace. He suggested to rewrite the module so that it is based on Algorithm::TokenBucket instead of Algorithm::FloodControl and file it under the Plugin namespace. To my module proposing Matt answered: > It's normal for Catalyst plugins to be rewritten to become controllers > - trying to go the other way round strongly suggests a design > mistake to me. In my opinion, the module Catalyst::Controller::RateLimit should be Catalyst::Plugin::RateLimit. But may be I'm wrong. What does the list think about this? Thanks, matt -- rainboxx Matthias Dietrich Freier Software Engineer rainboxx | Tel.: +49 (0) 151 / 50 60 78 64 Tölzer Str. 19 | Mail: matt[at]rainboxx.de 70372 Stuttgart | WWW : http://www.rainboxx.de XING: https://www.xing.com/profile/Matthias_Dietrich18 GULP: http://www.gulp.de/profil/rainboxx.html
|