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