line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
2740
|
use v5.16; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
127
|
|
2
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
151
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Net::Minecraft::Role::HTTP { |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Base class for Minecraft C things. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
962
|
use Moo::Role; |
|
3
|
|
|
|
|
28513
|
|
|
3
|
|
|
|
|
22
|
|
10
|
3
|
|
|
3
|
|
88582
|
use HTTP::Tiny; |
|
3
|
|
|
|
|
399641
|
|
|
3
|
|
|
|
|
154
|
|
11
|
3
|
|
|
3
|
|
37
|
use Scalar::Util qw( blessed ); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
731
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has user_agent => ( |
15
|
|
|
|
|
|
|
is => rwp =>, |
16
|
|
|
|
|
|
|
lazy => 1, |
17
|
|
|
|
|
|
|
default => sub { |
18
|
|
|
|
|
|
|
my $class = $_[0]; |
19
|
|
|
|
|
|
|
$class = blessed($class) if blessed($class); |
20
|
|
|
|
|
|
|
my $version = $class->VERSION; |
21
|
|
|
|
|
|
|
$version = 'DEVEL' if not defined $version; |
22
|
|
|
|
|
|
|
return sprintf q{%s/%s}, $class, $version; |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has http_headers => ( is => rwp =>, lazy => 1, default => sub { { 'Content-Type' => 'application/x-www-form-urlencoded' } }, ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has http_engine => ( is => rwp =>, lazy => 1, default => sub { return HTTP::Tiny->new( agent => $_[0]->user_agent ) }, ); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
BEGIN { |
34
|
3
|
|
|
3
|
|
164
|
$Net::Minecraft::Role::HTTP::AUTHORITY = 'cpan:KENTNL'; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
{ |
37
|
|
|
|
|
|
|
$Net::Minecraft::Role::HTTP::VERSION = '0.002000'; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |