1*** Net-Daemon/lib/Net/Daemon.pm 2007-06-17 11:39:46.000000000 -0700 2--- Net-Daemon/lib/Net/Daemon.pm.patched 2009-08-04 16:04:35.000000000 -0700 3*************** 4*** 258,263 **** 5--- 258,269 ---- 6 $self->{'mode'} = 'ithreads'; 7 } elsif (eval { require Thread }) { 8 $self->{'mode'} = 'threads'; 9+ # this really is to allow legacy code to co-exist 10+ if (eval { require threads::shared; }) { 11+ if (defined(threads::shared->can("share"))) { 12+ threads::shared::share(\$Net::Daemon::RegExpLock); 13+ } 14+ } 15 } else { 16 my $fork = 0; 17 if ($^O ne "MSWin32") { 18*************** 19*** 280,285 **** 20--- 286,296 ---- 21 require threads; 22 } elsif ($self->{'mode'} eq 'threads') { 23 require Thread; 24+ if (eval { require threads::shared; }) { 25+ if (defined(threads::shared->can("share"))) { 26+ threads::shared::share(\$Net::Daemon::RegExpLock); 27+ } 28+ } 29 } elsif ($self->{'mode'} eq 'fork') { 30 # Initialize forking mode ... 31 } elsif ($self->{'mode'} eq 'single') { 32