[Catalyst] External plugins
Christopher H. Laco
claco at chrislaco.com
Tue Feb 14 22:38:19 CET 2006
Ovid wrote:
> We have an app which uses Catalyst. However, the plugins can
> theoretically not be Catalyst specific. As far as I can tell, the only
> way to use a plugin which doesn't start with "Catalyst::Plugin::" is to
> do this:
>
> use base 'Some::Plugin::In::Another::Namespace';
>
> However, this has a potential problem. We now have two ways of doing
> the same thing (using plugins). At some point in the future, if the
> Catalyst::setup_plugins() method changes its behavior, those who "use
> base" to load a different plugin may not be able to take advantage of
> the new behavior. My suggestion is to allow a unary plus on a package
> name to allow "foreign" plugins:
>
> use Catalyst qw(
> DateTime
> +Some::Plugin::In::Another::Namespace
> );
>
> I'd happily make this change, but I'd rather hear from feedback from
> folks before I do this.
>
> Cheers,
> Ovid
>
Hmmm, why not split the problem into its two parts?
package Catalyst::Plugin::In::Another::Namespace;
use base qw/Some::Plugin::In::Another::Namespace/;
sub a place to override things just in case in needed to be {
};
and
package Some::Plugin::In::Another::Namespace;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060214/6c593bce/signature.pgp
More information about the Catalyst
mailing list