[ic] Override of item_subtotal : SOLVED
Tim Nelson
interchange-users@icdevgroup.org
Wed Sep 11 15:10:03 2002
After weeks of banging my head against the wall I was able to override the
item_subtotal routine in Data.pm. Thought I would post this in case other
users were having trouble overriding other IC functions. Key items here
are using the typeglob to reference item_subtotal and surrounding the
entire code with BEGIN { } to get it be worked on at compile time rather
than load time. Much thanks to Mike and Cursor...
GlobalSub <<EOS
sub override_item_subtotal {
BEGIN {
package Vend::Interpolate;
*item_subtotal = \&Vend::Data::item_subtotal;
package Vend::Data;
sub item_subtotal {
# Do something meaningful here.
return 1.23;
}
}
}
EOS