--- Brett Sanger <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 06, 2004 at 12:27:18PM -0700, Bill
> Catlan wrote:
> > However, semantically, we want the plugin to
> extend
> > C::A, not an app module. It's partly a
> psychological
> > argument I am making and partly a recommended
> object
> > heirarchy.
>
> Okay, this is where I'm confused. I'm not
> DISAGREEING (yet), so much as
> not understanding.
>
> I can see the benefit to not having the plugins in
> the C::A namespace.
> I often have hierachies of C::A descended objects
> across my sites.
>
> I'm not seeing the problem with using the app
> namespace. C::A is
> intended to be inheirited from. Different children
> will want different
> plugins loaded. Obviously you see some problem here
> I'm missing, so
> could you enlighten me.
Two plugins used by a child can contain the method
'foo'; Not too sure how the C::A::Plugin works, but
presumably the second plugin's foo will clobber the
first's in the child's namespace. Same problem, just
less likely, sort of.
Here, you don't have to worry about someone else
registering a plugin that clobbers the first foo. But
that's resolved by my revised suggestion which would
register plugins at runtime and have separate
namespaces for different plugins.
>
> > otherwise, plugins that only work with certain
> user
> > modules will call themselves C::A plugins,
> creating a
> > mess and result in confusion.
>
> That's a labelling issue, but not really a problem.
> If I peddle
> CGI::App::Foo, and write dependent plugins that can
> only be used by
> descendants of C::A::F, then my plugins should be
> C::A::F plugins just
> as C::A plugins are C::A. The fact of which
> namespace is used is not
> involved.
Fair enough. I just think using the app modules
namespace for a C::A plugin is not as clean and adds a
programmer step for every module. I probably will
want some plugins available across my modules - why
should I have to bring them in in every module? Let
C::A do it.
Again, we can have it both ways really, as long as we
agree to use the same method for creating separate
namespaces for plugins.
If we do, the resulting $myapp object (a child of
CGI::App with runtime plugin bindings) will see the
plugin space the same way, namely:
$myapp->{plugin_token}->plugin_method;
Bill
> What am I missing?
> --
> SwiftOne / Brett Sanger
> [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
> Web Archive:
>
http://www.mail-archive.com/[EMAIL PROTECTED]/
>
> http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]