| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::HTTP::Spore::Meta::Types; |
|
2
|
|
|
|
|
|
|
$Net::HTTP::Spore::Meta::Types::VERSION = '0.08'; |
|
3
|
|
|
|
|
|
|
# ABSTRACT: Moose type definitions for Net::HTTP::Spore |
|
4
|
|
|
|
|
|
|
|
|
5
|
23
|
|
|
23
|
|
154
|
use Moose::Util::TypeConstraints; |
|
|
23
|
|
|
|
|
49
|
|
|
|
23
|
|
|
|
|
244
|
|
|
6
|
23
|
|
|
23
|
|
45110
|
use MooseX::Types -declare => [ qw(UriPath Boolean HTTPMethod JSONBoolean) ]; |
|
|
23
|
|
|
|
|
51
|
|
|
|
23
|
|
|
|
|
204
|
|
|
7
|
23
|
|
|
23
|
|
128148
|
use MooseX::Types::Moose qw(Str Int Defined); |
|
|
23
|
|
|
|
|
54
|
|
|
|
23
|
|
|
|
|
225
|
|
|
8
|
23
|
|
|
23
|
|
113874
|
use JSON; |
|
|
23
|
|
|
|
|
57
|
|
|
|
23
|
|
|
|
|
192
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
subtype UriPath, |
|
11
|
|
|
|
|
|
|
as Str, |
|
12
|
|
|
|
|
|
|
where { $_ =~ m!^/! }, |
|
13
|
|
|
|
|
|
|
message {"path must start with /"}; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
enum HTTPMethod, [qw(OPTIONS HEAD GET POST PUT DELETE TRACE PATCH)]; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
subtype Boolean, |
|
18
|
|
|
|
|
|
|
as Int, |
|
19
|
|
|
|
|
|
|
where { $_ eq 1 || $_ eq 0 }; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
subtype JSONBoolean, |
|
22
|
|
|
|
|
|
|
as Defined, |
|
23
|
|
|
|
|
|
|
where { JSON::is_bool($_) }; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
coerce Boolean, |
|
26
|
|
|
|
|
|
|
from JSONBoolean, |
|
27
|
|
|
|
|
|
|
via { return int($_) ? 1 : 0 }, |
|
28
|
|
|
|
|
|
|
from Str, |
|
29
|
|
|
|
|
|
|
via { return $_ eq 'true' ? 1 : 0 }; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Net::HTTP::Spore::Meta::Types - Moose type definitions for Net::HTTP::Spore |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 0.08 |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 AUTHORS |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=over 4 |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item * |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Franck Cuny <franck.cuny@gmail.com> |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item * |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Ash Berlin <ash@cpan.org> |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item * |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Ahmad Fatoum <athreef@cpan.org> |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=back |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Linkfluence. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
70
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |