if ($ssl) { $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => $port, Reuse => 1, SSL_use_cert => 1, SSL_key_file => 'path/to/server.key', SSL_cert_file => 'path/to/server.crt') -> on_action(sub {}) -> dispatch_to('allmy','methodes') ; } $daemon->handle;