package MyApp::WSDL; use strict; use Pod::WSDL; sub handler : method { my ($s, $r) = @_; my ($package) = $r->uri =~ m/^\/([^\?]+)/; $package =~ s/\//::/g; my $pod = Pod::WSDL->new( source => $package, location => "http://$ENV{HTTP_HOST}" . $r->uri, pretty => 1, withDocumentation => 1, ); print "content-type: text/xml\n\n"; print $pod->WSDL; return 0; }# end handler() 1;# return true: