On 2004-08-30, Michael Peters <[EMAIL PROTECTED]> wrote:
> Stephen Howard wrote:
>> Although it is not really compatible with this approach, one of the nice
>> things about many plugin systems is that while they all reside in a
>> Foo::Plugin:: namespace, the mechanisms for importing the plugin usually
>> lets you drop the Foo::Plugin:: prefix when referring to it and it will
>> still do the Right Thing. Not really going anywhere with this, as it
>> would require a different approach, but was looking at the character
>> count of
>>
>> > use CGI::Application::Plugin::ValidateRM (qw/check_rm/);
>>
>> versus something like
>>
>> $app->load_plugin('ValidateRM', qw(check_rm));
>
> That's an interesting idea... I wonder what others would think of
> allowing both? If we have a standard way of importing, naming,
> etc... for the plugins then this might act as sort of a pseudo way
> of enforcing it. It should be trivial to add that sub to C::A and
> the plugin's author would need to make sure that their plugin worked
> that way.
I think these two approaches are quite compatible. I don't mind the
"long" syntax, because I only need to type the line once, and I think
it will be fine to put in a super class. It's also clearer what's going
on.
Here's another alternative, which has the same length as yours:
use CGIApp::Plugin::ValidateRM (qw/check_rm/);
or slightly longer
use CGI::App::Plugin::ValidateRM (qw/check_rm/);
I know the name space purists will cringe at these. ;)
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
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]