logo       

Re: preview: ValidateRM as a plug-in: msg#00152

Subject: Re: preview: ValidateRM as a plug-in
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




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe