example/lib/MyServer/HelloWorld/HelloWorldSoap.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm ↑ Summary lib/SOAP/WSDL/SOAP/Typelib/Fault.pm »
1 package MyServer::HelloWorld::HelloWorldSoap;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Class::Std::Fast::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base qw(SOAP::WSDL::Client::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # only load if it hasn't been loaded before
9 require MyTypemaps::HelloWorld
10 if not MyTypemaps::HelloWorld->can('get_class');
11  
12 my %transport_class_of :ATTR(:name<transport_class> :default<SOAP::WSDL::Server::CGI>);
13 my %transport_of :ATTR(:name<transport> :default<()>);
14 my %dispatch_to :ATTR(:name<dispatch_to>);
15  
16 my $action_map_ref = {
17 'urn:HelloWorld#sayHello' => 'sayHello',
18 };
19  
20 sub START {
21 my ($self, $ident, $arg_ref) = @_;
22 eval "require $transport_class_of{ $ident }"
23 or die "Cannot load transport class $transport_class_of{ $ident }: $@";
24 $transport_of{ $ident } = $transport_class_of{ $ident }->new({
25 action_map_ref => $action_map_ref,
26 class_resolver => 'MyTypemaps::HelloWorld',
27 dispatch_to => $dispatch_to{ $ident },
28 });
29 }
30  
31 sub handle {
32 $transport_of{ ${ $_[0] } }->handle(@_[1..$#_]);
33 }
34  
35 1;
36  
37  
38  
39 __END__
« blib/lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm ↑ Summary lib/SOAP/WSDL/SOAP/Typelib/Fault.pm »