On Wed, Oct 18, 2006 at 09:04:30AM +1000, Cees Hek wrote:

> On 10/14/06, Evan A. Zacks <[EMAIL PROTECTED]> wrote:
> 
> >But in the case of ValidateRM, the dfv_error_page() method is
> >exported by default, so there shouldn't be a case where you can't
> >call that method on $self.
> 
> I think this may be a remanant of older versions of the code.  In
> version 1.22 the recommended way to load the plugin was like this:
> 
> use CGI::Application::Plugin::ValidateRM (qw/check_rm/);

I see -- dfv_error_page() wouldn't be accessible via $self in
that case.

> >Is this calling style:
> >
> >  some_method($self)
> >
> >a standard convention to use to protect against the case where
> >some_method() may not be available to the calling class?
> 
> I wouldn't call it standard, but more a method of last resort (no pun
> intended).  What you end up doing here is making it difficult (if not
> imposible) to inherit and override this method.  In other words, it is
> a hack that helps out in some instances, but should be avoided if at
> all possible.

Thanks for the clarification, Cees.

-E

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