in reply to Re: constant name in variable
in thread constant name in variable

This seems like heavy sugar to avoid calling $analyzer->_IsToken() directly. Other than a preference for:
$object->IsSuffix( "PhD");
over
$object->Is( SUFFIX, "PhD");
I'm not seeing any reason to do this. Preference is a sufficient reason.

Am I missing something?

Replies are listed 'Best First'.
Re: Re: Re: constant name in variable
by shemp (Deacon) on Dec 02, 2002 at 22:16 UTC
    Preference is actually the main reason I've done it this way. It also allows an easy way to write an explicit IsSuffix(), to perform differently than what _IsToken(SUFFIX, ...) might do, if i need to create more in-depth analyzers than the trivial hash lookups that _IsToken() will be doing. That isn't a particularly great reason to do it this way though.
    I think i like practicing writing weird AUTOLOAD methods also, after having coded C++ for a number of years, which was much more annoying :)
    I am going to consider redesigning though.