[ic] How to Call a GlobalSub?

Mike Heins mikeh@minivend.com
Mon, 26 Feb 2001 21:49:01 -0500


Quoting Sam Hui (shui@lunamedium.com):
> Hi,
> 
> I'm having a bit of trouble calling a GlobalSub, even the one included, ie.
> 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]
 test_global_sub()
 [/perl]

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