[ic] passing variables to usertags

Leon Harris interchange-users@lists.akopia.com
Fri Jul 20 13:06:01 2001


Hi. I am having a hassle passing values to a usertag I defined in
/usr/lib/interchange.cfg

Can anyone please tell me why this doesn't work - I am rapidly going
bald, there are teeth marks on the monitor, the topics of reproduction,
excretion and interchange have been mentioned frequently in the same
sentence ..... you get the picture .... :)

----------------------------------------------------------
...extract from interchange.cfg

UserTag austpost_calc HasEndTag

Usertag austpost_calc Order Height Length Width Weight Quantity
Pickup_Postcode Destination_Postcode Country Service_Type

UserTag austpost_calc Routine <<EOF

sub {
my ( $Height, $Length, $Width, $Weight, $Quantity, $Pickup_Postcode,
$Destination_Postcode, $Country, $Service_Type ) = @_ ;

::logGlobal("calling with: " . join("|", $Height, $Length, $Width,
$Weight, $Quantity, $Pickup_Postcode, $Destination_Postcode, $Country,
$Service_Type));

--------------------------------------------------------

I call this from an interchange page with

[austpost_calc] Height=100 Length=100 Width=100 Weight=500 Quantity=1
Pickup_Postcode=6167 Destination_Postcode=2014 Country=US
Service_Type=Express [/austpost_calc]


----------------------------------------------------------

And I get .....

192.168.1.20 7Yfxdstk:192.168.1.20 - [20/July/2001:23:43:42 +0800] duke
/cgi-bin/duke/ calling with: ||||||||
.............^^^^-------where are my variables ?.

The usertag [austpost_calc] does work when I hardcode in the values in
the body of the sub.
It doesn't work if I just put positional values in eg [austpost_calc]
100 100 100 500 1 6167 2014 US Express [/austpost_calc]

Any ideas will be much appreciated.
Cheers,
Leon