[ic] newbie question: subroutines

Nick Ohanian nickychips@yahoo.com
Thu, 1 Mar 2001 16:18:48 -0800


Hello again-
	Here is an example of my problem, regarding GlobalSubs.  There was one
already in my interchange.cfg file, and it looks likes this:

GlobalSub sub test_global_sub { return 'Test of global subroutine OK.'; }

Pretty easy, eh?  So I use a perl tag in a page that looks like this:

[perl]
return test_global_sub();
[/perl]<br>

Now when I try to serve this page, nothing is displayed.  I get the
following in error.log (in the catalog directory):

66.12.71.6 rbuCIMHW:66.12.71.6 - [01/March/2001:16:06:29 -0800] imp
/cgi-bin/imp/catalog.html Safe: Unable to create sub named
"*MVSAFE::test_global_sub" at (eval 236) line 2.
>
>
> return test_global_sub();
>
>

I can't figure out what is causing this error.  Any suggestions would be
greatly appreciated.  Thanks so much.

Nick
nickychips@yahoo.com

> From: Mark Johnson <markj@redhat.com>
> Organization: Red Hat E-Business Solutions
> To: interchange-users@lists.akopia.com
> Subject: Re: [ic] RE: newbie question: subroutines
> Reply-To: interchange-users@lists.akopia.com
>
> With no more information than you've provided, there's little hope of
> anyone helping you. Try to post some examples of  a sub that doesn't
> work and where/how you're calling it in a page.
>
> Nick Ohanian wrote:
> >
> > > At 07:24 PM 2/28/2001 -0800, you wrote:
> > > >Hi-
> > > >         I'm having trouble getting local subroutines to work
> > > all.  I seem
> > > > to be
> > > >defining them correctly in catalog.cfg, but they appear to
> not be running
> > > >when called from [perl] tag in a page.  Are they any special
> > > configurations
> > > >settings that I should be aware of?  Any suggestions as to why
> > > this could be
> > > >happening?
> > >
> > > But they do work when you define them globally in interchange.cfg?
> > >
> > > Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com
> > >
> > > End of Interchange-users Digest
> >
> > No, global subroutines don't seem to be working either.  Any
> suggestions?
> >


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com