On 2/20/2006, "Beau E. Cox" <[EMAIL PROTECTED]> wrote: >On Sunday 19 February 2006 13:52, Tom Phoenix wrote: >> On 2/18/06, Tom Allison <[EMAIL PROTECTED]> wrote: >> > I am trying to set up a server using Net::Server. >> >> I believe that you omitted a vital piece at the top of your code: a >> package directive. >> >> package AuthServer; >> >> Without that, your @ISA variable isn't @AuthServer::ISA. But that's >> not the error you're getting, so I think it was omitted when you >> cut-and-pasted. With that line, I get the same results you do. >> >Net::Server works fine for me. I suggest you specify a log file and set >log-level to the 'debug' value (see the docs). Then bring up the >server, kill it, and examine the log. If you still cannot connect >to the port you want, post the log and we can (maybe) help >further. >
I think I need to back paddle a bit... take my script 'net_test.pl' and at line one give it a package 'AuthServer' (instead of main::). At the bottom of the file "1;" and inherit all the Net::Server goodies by calling @ISA = qw[Net::Server]; and then all the Net::Server functions (like pre_bind) are a part of my current package that I would access: AuthServer->pre_bind(); No matter what I've tried. I can't geth the example of (lines omitted for now); package AuthServer; @ISA = qw[Net::Server]; my $server = bless { port => 8081, }, 'AuthServer'; $server->run(); ##### This just goes through all the defaults (port 20203)... If I call it with $server->run(port=>8081); then it bind just fine. I'll try mucking with it again tonight and see what I can come up with. But I think I need to better understand just what @ISA is doing. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>