[ic] How to Call a GlobalSub?

Sam Hui shui@lunamedium.com
Mon, 26 Feb 2001 19:19:32 -0800

Thanks Mike,

Just tried your suggestion:

[perl subs=1]

and here is what I get in the error log: e3JGkEeq: - [26/February/2001:18:58:22 -0800]
store3 /cgi-bin/store3/test.html Runtime error: Unable to create sub named
"" at //usr/lib/interchange/lib/Vend/Interpolate.pm line 1656.

Why is it trying to create a sub when it is presumably already declared?
I'm running Interchange 4.6.3 under Red Hat 6.2.


-----Original Message-----
Date: Mon, 26 Feb 2001 21:49:01 -0500
From: Mike Heins <mikeh@minivend.com>
To: interchange-users@lists.akopia.com
Subject: Re: [ic] How to Call a GlobalSub?
Reply-To: mike@minivend.com
Reply-To: interchange-users@lists.akopia.com

Quoting Sam Hui (shui@lunamedium.com):
> Hi,
> I'm having a bit of trouble calling a GlobalSub, even the one included,
> test_global_sub which is declared like this in the interchange.cfg:
> Variable   DEBUG     1
> #ifdef @DEBUG
> GlobalSub sub test_global_sub { return "Test of global subroutine OK."; }
> #endif
> Then in a test.html file:
> <html>
> hello!
> [perl arg=sub interpolate=1]
> test_global_sub()
> [/perl]
> goodbye!
> </html>

Make it:

 [perl subs=1]

You almost never want interpolate=1 in a perl tag, either, nowadays.

Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer

End of Interchange-users Digest