12345678910111213141516
package MyDaemon;# ...sub run { my $self = shift; unless($^O eq 'MSWin32') { # run as real daemon - but not under windows require Proc::Daemon; Proc::Daemon::Init(); }}1;