From 6e84dcd4f3447ece4375eb1bf5200a771b8ff6c8 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 8 Aug 2007 12:09:19 +0000 Subject: [PATCH] Set global handle before calling start_server() --- SimpleServer.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SimpleServer.pm b/SimpleServer.pm index 0abbb92..e3ee48e 100644 --- a/SimpleServer.pm +++ b/SimpleServer.pm @@ -25,7 +25,7 @@ ## ## -## $Id: SimpleServer.pm,v 1.32 2007-08-08 10:27:43 mike Exp $ +## $Id: SimpleServer.pm,v 1.33 2007-08-08 12:09:19 mike Exp $ package Net::Z3950::SimpleServer; @@ -69,6 +69,13 @@ sub launch_server { my $self = shift; my @args = @_; + ### This modal internal interface, in which we set a bunch of + # globals and then call start_server(), is asking for + # trouble. Instead, we should just pass the $self object + # as a parameter into start_server(). + if (defined($self->{GHANDLE})) { + set_ghandle($self->{GHANDLE}); + } if (defined($self->{INIT})) { set_init_handler($self->{INIT}); } -- 1.7.10.4