socket accept() vs. CGI.pm accept() 
Author Message
 socket accept() vs. CGI.pm accept()

I am having a problem with a CGI program that also has to interface with
sockets. The problem is that CGI.pm has a routine called accept that seems
to be conflicting with the sockets routine by the same name. Has anybody
seen this? Am I doing something wrong? I know that I can just not import the
:cgi function set into my main namespace and avoid the problem, but that
means that I have to explicitly call out the package name for all the
functions in the :cgi function set, which is less than ideal. I was hoping
that someone had a more elegant solution.

You advice is much appreciated,
Scott Harper



Mon, 26 Feb 2001 03:00:00 GMT  
 socket accept() vs. CGI.pm accept()
On Thu, 10 Sep 1998 14:25:17 -0700, Scott Harper wrote :

Quote:
>I am having a problem with a CGI program that also has to interface with
>sockets. The problem is that CGI.pm has a routine called accept that seems
>to be conflicting with the sockets routine by the same name. Has anybody
>seen this? Am I doing something wrong? I know that I can just not import the
>:cgi function set into my main namespace and avoid the problem, but that
>means that I have to explicitly call out the package name for all the
>functions in the :cgi function set, which is less than ideal. I was hoping
>that someone had a more elegant solution.

For myself I actually prefer to use the full OO apparoach with CGI as
I find it clearer to see what is going on - I find nothing inelegeant
in:

use CGI;

my $query = new CGI;

print $query->header;

...

etc

Although admittedly there is a disincentive to use the HTML producing
methods a great deal then as you wind up with more typing (possibly)
thena actually typing the HTML tags - but swings and roundabouts.

/J\
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



Wed, 28 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PERLFUNC: accept - accept an incoming socket connect

2. PERLFUNC: accept - accept an incoming socket connect

3. io::socket::inet tcp accept vs recv

4. Unable to accept more than one connection on a listening socket

5. Socket Accept function dies

6. IO::Socket: accept w timeout problem

7. time out for IO::Socket::accept()

8. Multiple Accepts/Sockets

9. sockets: non-blocking accept on BSDOS

10. IO::Socket accept method on Solaris

11. Socket problem with multiple accepts.

12. Socket problem with multiple accepts

 

 
Powered by phpBB® Forum Software