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));
Mark Stosberg wrote:
Hello,
I have a preview of CGI::Application::Plugin::ValidateRM if you are
interested. It's mostly a name change.
I did change one other thing: I no longer export the methods by default.
So this:
use CGI::Application::ValidateRM;
becomes
use CGI::Application::Plugin::ValidateRM (qw/check_rm/);
This change adheres better with the Exporter recommendation to not
export anything by default. It should also make it easier for
maintenance programmers, who see the check_rm() method, and wonder where
the the fsck it came from.
This is name space management design I'm proposing as a standard for
other plug-in writers as well.
Oh, I almost forgot the link:
http://mark.stosberg.com/perl/CGI-Application-Plugin-ValidateRM-1.20.tar.gz
I do plan to keep the code on CPAN under the old name for now, with
disclaimer added that the "plugin" version is recommended.
Unless there are concerns about this design, I'll make this release
formal in a couple of days.
Mark
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|