line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::EveOnline::EveCentral::Request; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Games::EveOnline::EveCentral::Request::VERSION = '0.001'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Base class for the Request::* classes. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
5033
|
use Moo 1.003001; |
|
6
|
|
|
|
|
117
|
|
|
6
|
|
|
|
|
47
|
|
11
|
6
|
|
|
6
|
|
2311
|
use MooX::Types::MooseLike 0.25; |
|
6
|
|
|
|
|
134
|
|
|
6
|
|
|
|
|
271
|
|
12
|
6
|
|
|
6
|
|
44
|
use MooX::StrictConstructor 0.006; |
|
6
|
|
|
|
|
112
|
|
|
6
|
|
|
|
|
46
|
|
13
|
|
|
|
|
|
|
|
14
|
6
|
|
|
6
|
|
4286
|
use 5.012; |
|
6
|
|
|
|
|
35
|
|
|
6
|
|
|
|
|
231
|
|
15
|
|
|
|
|
|
|
|
16
|
6
|
|
|
6
|
|
4015
|
use Games::EveOnline::EveCentral::HTTPRequest; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
664
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub http_request { |
21
|
6
|
|
|
6
|
1
|
20
|
my ($self, $path, $content) = @_; |
22
|
6
|
100
|
66
|
|
|
53
|
my $method = (defined $content && ref $content eq 'ARRAY')? 'POST' : 'GET'; |
23
|
|
|
|
|
|
|
|
24
|
6
|
|
|
|
|
67
|
return Games::EveOnline::EveCentral::HTTPRequest->new( |
25
|
|
|
|
|
|
|
method => $method, |
26
|
|
|
|
|
|
|
path => $path, |
27
|
|
|
|
|
|
|
content => $content |
28
|
|
|
|
|
|
|
)->http_request; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; # End of Games::EveOnline::EveCentral::Request |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Games::EveOnline::EveCentral::Request - Base class for the Request::* classes. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 0.001 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Base class for the Request::* classes, this class exists to provide the |
52
|
|
|
|
|
|
|
http_request method. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=for test_synopsis no strict 'vars' |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 http_request |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Creates a L<HTTP::Request> object using the object's fields as parameters and |
61
|
|
|
|
|
|
|
GET as the HTTP method. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=begin private =end private |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Pedro Figueiredo, C<< <me at pedrofigueiredo.org> >> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 BUGS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Please report any bugs or feature requests through the web interface at |
73
|
|
|
|
|
|
|
L<https://github.com/pfig/games-eveonline-evecentral/issues>. I will be |
74
|
|
|
|
|
|
|
notified, and then you'll automatically be notified of progress on your bug as |
75
|
|
|
|
|
|
|
I make changes. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 SUPPORT |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
perldoc Games::EveOnline::EveCentral |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
You can also look for information at: |
86
|
|
|
|
|
|
|
=over 4 |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * GitHub Issues (report bugs here) |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L<https://github.com/pfig/games-eveonline-evecentral/issues> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Games-EveOnline-EveCentral> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * CPAN Ratings |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Games-EveOnline-EveCentral> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * CPAN |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
L<http://metacpan.org/module/Games::EveOnline::EveCentral> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=back |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=over 4 |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * The people behind EVE Central. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L<http://eve-central.com/> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=back |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Copyright 2013 Pedro Figueiredo. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
121
|
|
|
|
|
|
|
under the terms of the Artistic License. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=end private |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 AUTHOR |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Pedro Figueiredo <me@pedrofigueiredo.org> |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Pedro Figueiredo. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
136
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=cut |