Bill Catlan wrote:

> I am still a bit troubled by perl's Exporter, and
conflicting methods being exported, but I guess that
can be managed somehow, without a shotgun. :)


It just adds a research layer for plugin developers if
they wanted to be duly diligent about not naming their
exported methods the same as someone else.

Note you might want to intentionally use the same name space as another plugin, if one could pose as a drop in replacement for the other. For example, if CGI.pm was moved out to a plugin which imported the query() method to C::A, then a CGI::Simple plugin might also wish to import a query() method. It is highly unlikely that both would be used within the same application. They also support much of the same API, so it would be easy to swap one out for the other.


You might also use the same method name where two plugins provide the same service, even if their api's don't match. I doubt you'll find many applications using both the Template Toolkit and HTML::Template within one module. So letting them both register a template() method as an accessor to their singleton makes sense to me.

This is probably fancier than C::A needs to get, but feel free to look at how I handle plugin management in Application::Pipeline. It's quite simple for both the application writer and for the plugin writer, but does resort to some magic to make it work.

-Stephen

---------------------------------------------------------------------
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]



Reply via email to