[ic] include GlobalSub in interchange.cfg

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


Excellent, thank you for the tip. Here is my latest hurdle:

My GlobalSub opens a socket to talk to another server. I have tested
this as a perl program from my command line where it works fine. Here is
part of the code:

use IO::Socket;
my $server = '206.191.4.228';
my $port = 30000;

my $sock = IO::Socket::INET->new(
  Proto  => "tcp",
  PeerAddr => $server,
  PeerPort => $port,
  Reuse => 1
  );
 unless ($sock) { return("cannot connect to remote host"); }

But when I try to run this through ic I get this error message:

127.0.0.1 uthu8k6e:127.0.0.1 - [31/March/2002:23:48:00 -0500] foundation
/cgi-bin/foundation/aboutus.html Safe: Can't locate object method "new"
via package "IO::Socket::INET" (perhaps you forgot to load
"IO::Socket::INET"?) at (eval 128) line 34.

Since I did say use IO::Socket it makes me think it is some kind of path
or permission thing. Interchange is unable to load the Socket module
while my Perl system can. And why the error for Socket::INET?

Any assistance you can provide will surely help to save my life.


On Mon, 2002-04-01 at 11:05, Ed LaFrance wrote:
> At 10:59 PM 3/31/2002 -0500, you wrote:
> >I see that I can define a GlobalSub in interchange.cfg and finally
> >release my code from the oppression of Safe. But my GlobalSub is getting
> >pretty long and I would like to put it all in it's own file.
> >
> >So can I put something like this in interchange.cfg?
> >
> >include GlobalSub /dirpath/mysub.pl
> >
> >I want to tell ic.cfg to grab my GlobalSub file from some other place.
> 
> Just do this in interchange.cfg:
> 
> include relativepath/*.pl
> 
> 
> ...then put your Globalsub in that file, starting with the directive, i.e.:
> 
> Globalsub <<EOS
>          (body of sub here)
> EOS
> 
> 
> - Ed L.
> 
> >
> 
> ===============================================================
> New Media E.M.S.               Software Solutions for Business
> 463 Main St., Suite D          eCommerce | Consulting | Hosting
> Placerville, CA  95667         edl@newmediaems.com
> (530) 622-9421                 http://www.newmediaems.com
> (866) 519-4680 Toll-Free       (530) 622-9426 Fax
> ===============================================================
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users