use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('Temperatures') -> handle;
package Temperatures; sub new { my $self = shift; my $class = ref($self) || $self; bless {_temperature => shift} => $class; } sub as_fahrenheit { return shift->{_temperature}; } sub as_celsius { return 5/9*(shift->{_temperature}-32); }
Create your own class and give access to it with dispatch_to() method. No less, no more.
dispatch_to()