EveCentral/Request/Route.pm

filter: Statementstmt 100% 33 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 100% 42 / 42 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« EveCentral/Request/QuickLookPath.pm ↑ Summary
1 package Games::EveOnline::EveCentral::Request::Route;
2 {
3 3 $Games::EveOnline::EveCentral::Request::Route::VERSION = '0.001';
4 }
5  
6  
7 # ABSTRACT: Create a request for the route endpoint.
8  
9  
10 3 ▶use Moo 1.003001;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use MooX::Types::MooseLike 0.25;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use MooX::StrictConstructor 0.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 3 ▶use MooX::Types::MooseLike::Base qw(AnyOf Int Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶use 5.012;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 3 extends 'Games::EveOnline::EveCentral::Request';
18  
19 3 ▶use Readonly 1.03;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21  
22 3 Readonly::Scalar my $ENDPOINT => 'route';
23  
24  
25 3 has 'from_system' => (
26 is => 'ro',
27 isa => AnyOf[Int, Str],
28 required => 1
29 );
30  
31 3 has 'to_system' => (
32 is => 'ro',
33 isa => AnyOf[Int, Str],
34 required => 1
35 );
36  
37 3 has '_path' => (
38 is => 'lazy',
39 isa => Str,
40 );
41  
42  
43  
44 2 ▶sub request {
Subroutine request: called CC=1 SCAR=0.0
Pod documented
45 2 my $self = shift;
46 2 my $path = $self->_path;
47  
48 2 return $self->http_request($path);
49 }
50  
51  
52  
53 3 ▶sub _build__path {
Subroutine _build__path: called CC=1 SCAR=0.0
54 3 my $self = shift;
55  
56 3 my $path = $ENDPOINT . '/';
57  
58 3 $path .= 'from/' . $self->from_system . '/';
59 3 $path .= 'to/' . $self->to_system;
60  
61 3 return $path;
62 }
63  
64  
65 3 1; # End of Games::EveOnline::EveCentral::Request::Route
66  
67 __END__
« EveCentral/Request/QuickLookPath.pm ↑ Summary