blib/lib/W3C/SOAP/WSDL/Utils.pm

filter: Statementstmt 96.9% 32 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 10 / 11 Podpod 100% 1 / 1 totaltotal 95.5% 43 / 45 CC 1 SCAR 0.1
CC
1
Cov
97%
__ANON__
1.0
first_action
1.0
op_set
1.0
CRAP 1.0
« blib/lib/W3C/SOAP/Header/Security.pm ↑ Summary blib/lib/W3C/SOAP/XSD/Traits.pm »
1 package W3C::SOAP::WSDL::Utils;
2  
3 # Created on: 2013-06-27 17:13:29
4 # Create by: Ivan Wills
5 # $Id$
6 # $Revision$, $HeadURL$, $Date$
7 # $Revision$, $Source$, $Date$
8  
9 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 8 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 8 ▶use Scalar::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 8 ▶use List::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 8 ▶use Data::Dumper qw/Dumper/;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 8 ▶use English qw/ -no_match_vars /;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 8 ▶use W3C::SOAP::WSDL::Meta::Method;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 6 Moose::Exporter->setup_import_methods(
19 with_meta => ['operation'],
20 );
21  
22 6 our $VERSION = 0.13;
23  
24 sub operation {
25 4 ▶ my ( $meta, $name, %options ) = @_;
Subroutine operation: called CC=1 SCAR=0.0
Pod documented
26 $meta->add_method(
27 $name,
28 W3C::SOAP::WSDL::Meta::Method->wrap(
29 0 ▶ body => sub { shift->_request($name => @_) },
Subroutine __ANON__: not called CC=1 SCAR=0.4
Subroutine first_action: called CC=1 SCAR=0.4
30 4 package_name => $meta->name,
31 name => $name,
32 %options,
33 )
34 );
35 4 return;
36 }
37  
38 6 1;
39  
40 __END__
41  
42 =head1 NAME
43  
44 W3C::SOAP::WSDL::Utils - WSDL related utilities
45  
46 =head1 VERSION
47  
48 This documentation refers to W3C::SOAP::WSDL::Utils version 0.13
49  
50  
51 =head1 SYNOPSIS
52  
53 use W3C::SOAP::WSDL::Utils;
54  
55 # In a WSDL package to generate an operation method:
56 operation wsdl_op => (
57 wsdl_operation => 'WsdlOp',
58 in_class +> 'MyApp::Some::XSD',
59 in_attribute +> 'wsdl_op_request',
60 out_class +> 'MyApp::Some::XSD',
61 out_attribute +> 'wsdl_op_response',
62 );
63  
64 =head1 DESCRIPTION
65  
66 =head1 SUBROUTINES/METHODS
67  
68 =head1 MOOSE HELPERS
69  
70 =over 4
71  
72 =item C<operation ($name, %optisns)>
73  
74 Generates a SOAP operation method with the name C<$name>
75  
76 The options are:
77  
78 =over 4
79  
80 =item C<wsdl_operation>
81  
82 The name of the operation from the WSDL
83  
84 =item C<in_class>
85  
86 The name of the XSD generated module that the inputs should be made against
87  
88 =item C<in_attribute>
89  
90 The particular element form the C<in_class> XSD
91  
92 =item C<out_class>
93  
94 The name of the XSD generated module that the outputs should be passed to
95  
96 =item C<out_attribute>
97  
98 The particular element form the C<out_class> XSD that contains the results.
99  
100 =back
101  
102 =back
103  
104 =head1 DIAGNOSTICS
105  
106 =head1 CONFIGURATION AND ENVIRONMENT
107  
108 =head1 DEPENDENCIES
109  
110 =head1 INCOMPATIBILITIES
111  
112 There are no known bugs in this module.
113  
114 Please report problems to Ivan Wills (ivan.wills@gmail.com).
115  
116 Patches are welcome.
117  
118 =head1 AUTHOR
119  
120 Ivan Wills - (ivan.wills@gmail.com)
121  
122 =head1 LICENSE AND COPYRIGHT
123  
124 Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077).
125 All rights reserved.
126  
127 This module is free software; you can redistribute it and/or modify it under
128 the same terms as Perl itself. See L<perlartistic>. This program is
129 distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
130 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
131 PARTICULAR PURPOSE.
132  
133 =cut
« blib/lib/W3C/SOAP/Header/Security.pm ↑ Summary blib/lib/W3C/SOAP/XSD/Traits.pm »