Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

Re: [ic] How to Call a GlobalSub?



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

_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: