[ic] UserTag Troubles 'code is not a subroutine reference'

Eric Small interchange at ericsmall.com
Fri May 14 14:34:44 EDT 2004


I'm having trouble getting started with my first UserTag.
I keep getting this message when I restart Interchange:

...UI is loaded...
UserTag 'shiptest' code is not a subroutine reference
In line 6 of the configuration file '/etc/interchange/usertag/shiptest.tag':

At first I thought it was an error in my perl code so I ran the code 
through perl -cw as was suggested in another thread.  There were some 
syntactical errors, which I fixed, but that warning still occurred.  I 
have now removed all my perl code and made the tag simply this:

UserTag shiptest Order mode zip country
UserTag shiptest Routine<<EOR
sub {
   return 1;
}
EOR

I must be doing something wrong with the definition to get an error with 
a simple tag like that.  I can't seem to figure out what I'm doing wrong 
though.  If I ignore the warning then I get this in the catalog error 
log when calculating shipping: Shipping mode 'GNDCOM': bad formula. 
Returning 0

Excerpt from shipping.asc:

GNDCOM:	UPS Ground
	crit			weight
	at_least		4
	adder			1 + (@@TOTAL@@ * ($Variable->{UPS_ADDER_PCT} || .20))
	ui_ship_type	UPSE:GNDCOM
	PriceDivide		1
	service         GNDCOM
	aggregate       150

	min				0
	max				0
	cost			e Nothing to ship!

	min				0
	max				150
	cost			f [shiptest mode="GNDCOM" zip="[value zip]" country="[value 
country]"]

	min				150
	max				999999999
	cost			e Too heavy for UPS Ground

Thanks for any advice,
Eric

-- 

Interchange 5.2.0 / Debian 3.0 Stable / PostgreSQL 7.4.1



More information about the interchange-users mailing list