[Catalyst] Calling form plugin authors: these should not be plugins

John Napiorkowski jjn1056 at yahoo.com
Mon Nov 20 15:29:41 GMT 2006


--- Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:

> I looked at the code of some plugins - it's quite
> frequent that they
> don't do anything beside just putting the method
> calls from some
> original module to the context object.
> I don't  see any advantage in using $c->some_method
> instead of
> Some::Module->some_method. This unnecessarily
> complicate the
> inheritance tree.  The only marginal benefit is that
> they state - this
> module can work with Catalyst.

One thing that would help with this is if there was
some clear instructions about how to add external perl
modules to a global namespace in Catalyst.  I find I
end up with:

package myapp::Controller::foo;

use Other::Module;
use Another::Usefull::Module;

at the top of a lot of controllers.  I usually end up
creating a base controller with all those modules I
typically use and inherit from that instead of from
Catalyst Controller.  People who did mod_perl
programming are used to preloading stuff and having it
available, however I haven't figured out how this
works in Catalyst.

Maybe the guidelines should include a best practice
way to handle this need, then I think people would not
be so tempted to make a plugin just to have a module
available?

--john

> 
> --
> Zbyszek
> 
> On 11/20/06, Robert 'phaylon' Sedlacek <rs at 474.at>
> wrote:
> >
> > Jon said:
> > >
> > > Hear, hear!  One of the things I had real
> trouble getting my head around
> > > on introduction to Catalyst was why things like
> FormBuilder and Widget
> > > had to be plugins.  Ended up wasting a lot of
> time trying to write code
> > > that I couldn't see the sense in.  Perhaps
> > > Catalyst::Manual::WritingPlugins could be
> augmented with a set of
> > > guidelines or tests for what should and
> shouldn't constitute a plugin vs
> > > component?
> >
> > I'm working on a complete rewrite. The new version
> will be less focussed
> > on plugins and more on extension and customisation
> of the framework.
> >
> > gr.,
> > Robert
> >
> > --
> > # Robert 'phaylon' Sedlacek
> > # Perl 5/Catalyst Developer in Hamburg, Germany
> > { EMail => ' rs at 474.at ', Web => ' http://474.at '
> }
> >
> >
> > _______________________________________________
> > List: Catalyst at lists.rawmode.org
> > Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> > Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> > Dev site: http://dev.catalyst.perl.org/
> >
> 
> 
> -- 
> Zbigniew Lukasiak
> http://brudnopis.blogspot.com/
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
> 



 
____________________________________________________________________________________
Sponsored Link

$420k for $1,399/mo. 
Think You Pay Too Much For Your Mortgage? 
Find Out! www.LowerMyBills.com/lre



More information about the Catalyst mailing list