[ic] passing variables to usertags

Donald Lin interchange-users@lists.akopia.com
Fri Jul 20 14:51:01 2001


Try putting the variables inside the brackets. So in your case it would be:

 [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 if this doesn't work try putting "" around the values. I currently have
usertags working and I define my variables in this way.

Hope this helps,
Donald

----- Original Message -----
From: "Leon Harris" <leon@quoll.com>
To: <interchange-users@developer.akopia.com>
Sent: Friday, July 20, 2001 1:39 PM
Subject: [ic] passing variables to usertags


> 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
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>