blib/lib/W3C/SOAP/WADL/Meta/Method.pm

filter: Statementstmt 100% 32 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 40 / 40 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/W3C/SOAP/WADL/Document/Response.pm ↑ Summary blib/lib/W3C/SOAP/WADL/Traits.pm »
1 package W3C::SOAP::WADL::Meta::Method;
2  
3 # Created on: 2012-07-15 19:45:13
4 # Create by: Ivan Wills
5 # $Id$
6 # $Revision$, $HeadURL$, $Date$
7 # $Revision$, $Source$, $Date$
8  
9 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 3 ▶use Scalar::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 3 ▶use List::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 #use List::MoreUtils;
16 3 ▶use Data::Dumper qw/Dumper/;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 3 ▶use English qw/ -no_match_vars /;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 3 extends 'Moose::Meta::Method';
20  
21 3 our $VERSION = version->new('0.006');
22  
23 3 has name => (
24 is => 'rw',
25 isa => 'Str',
26 predicate => 'has_name',
27 );
28 3 has path => (
29 is => 'rw',
30 isa => 'Str',
31 required => 1,
32 predicate => 'has_path',
33 );
34 3 has method => (
35 is => 'rw',
36 isa => 'Str',
37 required => 1,
38 predicate => 'has_method',
39 );
40 3 has request => (
41 is => 'rw',
42 isa => 'Str',
43 predicate => 'has_request',
44 );
45 3 has response => (
46 is => 'rw',
47 isa => 'HashRef[Str]',
48 predicate => 'has_response',
49 );
50  
51  
52 3 1;
53  
54 __END__
55  
56 =head1 NAME
57  
58 W3C::SOAP::WADL::Meta::Method - Parameters needed for WADL operations.
59  
60 =head1 VERSION
61  
62 This documentation refers to W3C::SOAP::WADL::Meta::Method version 0.006.
63  
64 =head1 SYNOPSIS
65  
66 use W3C::SOAP::WADL::Utils;
67  
68 # create an operation in the current class
69 operation name => (
70 path => 'rel/path',
71 method => 'GET',
72 request => 'Some::Thing::nameGET',
73 response => {
74 200 => 'Some::Ting::pingGet::200',
75 400 => 'Some::Ting::pingGet::400',
76 },
77 );
78  
79 =head1 DESCRIPTION
80  
81 Provides the description of extra parameters for operations, use L<W3C::SOAP::WADL::Utils>'s
82 operation function to access this functionality.
83  
84 =head1 ATTRIBUTES
85  
86 =over 4
87  
88 =item name
89  
90 The name of the operation
91  
92 =item path
93  
94 The path of the operation (relative to the WADL's base)
95  
96 =item method
97  
98 The type of HTTP request GET, POST, PUT, DELETE etc
99  
100 =item request
101  
102 The request class name
103  
104 =item response
105  
106 A map of response HTTP status codes to classes
107  
108 =back
109  
110 =head1 DIAGNOSTICS
111  
112 =head1 CONFIGURATION AND ENVIRONMENT
113  
114 =head1 DEPENDENCIES
115  
116 =head1 INCOMPATIBILITIES
117  
118 =head1 BUGS AND LIMITATIONS
119  
120 There are no known bugs in this module.
121  
122 Please report problems to Ivan Wills (ivan.wills@gmail.com).
123  
124 Patches are welcome.
125  
126 =head1 AUTHOR
127  
128 Ivan Wills - (ivan.wills@gmail.com)
129  
130 =head1 LICENSE AND COPYRIGHT
131  
132 Copyright (c) 2012 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077).
133 All rights reserved.
134  
135 This module is free software; you can redistribute it and/or modify it under
136 the same terms as Perl itself. See L<perlartistic>. This program is
137 distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
138 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
139 PARTICULAR PURPOSE.
140  
141 =cut
« blib/lib/W3C/SOAP/WADL/Document/Response.pm ↑ Summary blib/lib/W3C/SOAP/WADL/Traits.pm »