[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] How to Call a GlobalSub?
Hi Sam & Mike,
Likewise I have been having problems with the GlobalSubs, I attempted
what Mike suggested:
==snip===============
[perl subs=1]
test_global_sub()
[/perl]
==/snip==============
Using: IC 4.6.3 (tarball), Debian 2.2.17, Perl 5.005-03
And here is the results from from the catalog and Interchange error logs
(absolutely identical):
==snip===============
192.168.0.126 JXisUioQ:192.168.0.126 - [27/February/2001:10:03:16 +0000]
cishop /exec/cishop/test Safe: Unable to create sub named
"*MVSAFE::test_global_sub" at (eval 255) line 2.
==/snip==============
Hope that doesn't make the problem more convoluted? ;-)
Rgds
Dave
---------------------------------------------
>Thanks Mike,
>
>Just tried your suggestion:
>
>[perl subs=1]
>test_global_sub()
>[/perl]
>
>and here is what I get in the error log:
>
>192.168.0.84 e3JGkEeq:192.168.0.84 - [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.
>
>-Sam
>
>-----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,
>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.
>
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users