line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::HTTP::Spore::Meta::Types; |
2
|
|
|
|
|
|
|
$Net::HTTP::Spore::Meta::Types::VERSION = '0.07'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Moose type definitions for Net::HTTP::Spore |
4
|
|
|
|
|
|
|
|
5
|
22
|
|
|
22
|
|
149
|
use Moose::Util::TypeConstraints; |
|
22
|
|
|
|
|
43
|
|
|
22
|
|
|
|
|
226
|
|
6
|
22
|
|
|
22
|
|
40165
|
use MooseX::Types -declare => [ qw(UriPath Boolean HTTPMethod JSONBoolean) ]; |
|
22
|
|
|
|
|
46
|
|
|
22
|
|
|
|
|
181
|
|
7
|
22
|
|
|
22
|
|
115577
|
use MooseX::Types::Moose qw(Str Int Defined); |
|
22
|
|
|
|
|
50
|
|
|
22
|
|
|
|
|
188
|
|
8
|
22
|
|
|
22
|
|
100411
|
use JSON; |
|
22
|
|
|
|
|
47
|
|
|
22
|
|
|
|
|
183
|
|
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 $_ == JSON::true() ? 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.07 |
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 |