[ic] passing variables to usertags

Ed LaFrance interchange-users@lists.akopia.com
Fri Jul 20 14:39:00 2001


At 01:27 AM 07/21/2001 +0800, you wrote:
>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

Remove the 'Order' line above - that is for args within the []'s, i.e.: 
[foo_tag Height=10][/foo_tag].  From there the log will tell all...

- Ed L.


>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

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================