[ic] include GlobalSub in interchange.cfg

Honest to Goodness interchange-users@interchange.redhat.com
Mon Apr 1 16:52:01 2002


On Mon, 2002-04-01 at 16:19, Kevin Walsh wrote:
> > > I think you may have two versions of Perl installed on the same
> > > machine.  Interchange could be using one and your external test
> > > program could be using the other.  If IO::Socket::INET is only
> > > installed under one of the two versions, then you will get the
> > > problems you have described.
> > > 
> > > Check the first line of your bin/interchange file and look for
> > > 
> > >     #!/usr/bin/perl
> > > 
> > > ...then check your test script to see if it's looking for Perl
> > > in the same place.
> > >
> > An interesting speculation. The first line of bin/interchange is indeed
> > #!usr/bin/perl which is a symlink that points to perl5.6.1. Substituting
> > in the 5.6.1 makes no difference. In /usr/bin there is only one perl
> > executable and a couple of other symlinks that point to it.
> > 
> > My standalone globalsub didn't have such a first line but putting it in
> > made no difference. However I did notice something as I checked these
> > things out.
> >
> The magic string won't make a difference in a GlobalSub.
> 
> > 
> > I run my standalone version like this: "perl tcptest.pl".
> > Could the fact that I'm invoking perl directly to run my script make the
> > difference? Maybe it's got something to do with the way my shell is set
> > up to handle perl executables?
> > 
> Type the "type perl" command, which will tell you which perl being
> run from the command line.  Either that, or add the "#!" magic into
> your perl script, make it executable and type "./tcptest.pl".

I actually tried those things, and when running the standalone with the
magic string from this command line: "./tcptest.pl"
everything works.

I used perl -MCPAN to get Socket and it was up to date and I also got
Socket6 and I'll test it but it's probably not neccessary.

What about GloabalSub <<EOS versus GlobalSub <<EOF?
They seem to do the same thing.

What about the way I call and return? In my checkout.html I have:

[perl subs=1]
my @out = tcptest();
return("@out");
[/perl]

and the GlobalSub also returns with return("@out"); I had to send back
an interpolated array to get it to work.

Other than that I'm stumped. I'll try loading other modules with use and
see if it's just IO::Socket that is the problem.