[ic] Wierdness with AutoLoad And Item Actions, Possible Bug

Mike Heins mike at perusion.com
Fri Apr 23 14:03:06 EDT 2004

Quoting Shawn Mathews (shawn at stuckinrealtime.us):
> I'm getting some weird results under ic 5.01 when I use AutoLoad along 
> with item actions.
> I'll explain the setup.... (code follows at end of message)
> #1) I'm using Matrix Options. The rules for my client are that only 
> variant items can be ordered not the base item. Only one Variant for any 
>   base item can be purchased.
> ie. XYZ = Base Product , XYZ-01 thru XYZ-06 are the variants.
> #2)I have a global sub defined in my interchange.cfg which I reference 
> for the different item actions.
> #3)I use an AutoLoad Globalsub which does a few things for our affiliate 
> system. (setting initial referer, etc)
> Now The Problem
> If I referernce my Autoload as a global sub, I get an error when I add 
> items to the cart which have an item action associated with them.
> [22/April/2004:19:05:06 -0400] oldvprx /oldvprx/ord/basket.html 
> Undefined subroutine &Vend::Interpolate::eye5_singleitem called at (eval 
> 371) line 4.
> If I insert the AutoLoad code into the catalog.cfg using heredoc syntax 
>   and [perl] ... [/perl] I get the same error.
> The error stops if I use [perl global=1 subs=1] ... [/perl]
> Any Ideas why this would be happening?

Yes. Put at the top of the GlobalSub:

	package Vend::Interpolate;

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Friends don't let friends use Outlook. -- Bob Blaylock

More information about the interchange-users mailing list