[ic] GlobalSub Overriding not seen in Authorizenet

Kevin Walsh interchange-users@icdevgroup.org
Thu Jun 13 06:11:02 2002


> 
> I am trying to override the logDebug function by creating
> a GlobalSub which gets included in my interchange.cfg.
> This works when I call Debug from my html pages and
> the usertags. However from the Authorizenet and the 
> UserDB modules for example, the old logDebug function
> still gets used.
> 
> How can I use my new logDebug in Authorizenet.pm
> without editing directly the Util.pm module?
> 
> My new logDebug:
> 
> GlobalSub <<EOR
> sub new_util {
>     BEGIN {
>         package Vend::Util;
> 
>         sub logDebug {
>             xxxx;
>         }
>     }
> }
> EOR
>
Untested, but try this:

    GlobalSub <<EOR
    sub new_util {
        package Vend::Util;
        use Vend::Util;

        sub ::logDebug {
            xxxx;
        }
    }
    EOR

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/