1#!perl -w 2#!d:\perl\bin\perl.exe 3 4eval { require SOAP::Transport::HTTP::Daemon::ForkAfterProcessing } or die <<EOW; 5$@ 6 WARNING: module for Daemon::ForkAfterProcessing is not installed by default. 7 It's in examples/SOAP/Transport/HTTP/ directory 8 you can install it yourself. 9 Forking behavior IS specific: it is forking AFTER handling request. 10 Feel free to modify this behavior. It's just an example. 11EOW 12 13$SIG{PIPE} = $SIG{INT} = 'IGNORE'; # don't want to die on 'Broken pipe' or Ctrl-C 14$SIG{CHLD} = 'IGNORE'; # do not create zombies 15 16my $daemon = SOAP::Transport::HTTP::Daemon::ForkAfterProcessing 17 -> new (LocalAddr => 'localhost', LocalPort => 80) 18 # you may also add other options, like 'Reuse' => 1 and/or 'Listen' => 128 19 # specify list of objects-by-reference here 20 -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) 21 # specify path to My/Examples.pm here 22 -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') 23; 24print "Contact to SOAP server at ", $daemon->url, "\n"; 25$daemon->handle; 26