File Coverage

blib/lib/Map/Metro/Graph/Transfer.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1 2     2   22 use 5.10.0;
  2         5  
2 2     2   9 use strict;
  2         2  
  2         39  
3 2     2   8 use warnings;
  2         4  
  2         99  
4              
5             package Map::Metro::Graph::Transfer;
6              
7             # ABSTRACT: Moving between two stations without a connection between them
8             our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9             our $VERSION = '0.2405';
10              
11 2     2   8 use Map::Metro::Elk;
  2         3  
  2         13  
12 2     2   2676 use Types::Standard qw/Int/;
  2         5  
  2         14  
13 2     2   1087 use Map::Metro::Types qw/Station/;
  2         4  
  2         10  
14              
15             has origin_station => (
16             is => 'ro',
17             isa => Station,
18             required => 1,
19             );
20             has destination_station => (
21             is => 'ro',
22             isa => Station,
23             required => 1,
24             );
25             has weight => (
26             is => 'ro',
27             isa => Int,
28             default => 5,
29             );
30              
31             __PACKAGE__->meta->make_immutable;
32              
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             Map::Metro::Graph::Transfer - Moving between two stations without a connection between them
44              
45             =head1 VERSION
46              
47             Version 0.2405, released 2016-07-23.
48              
49             =head1 DESCRIPTION
50              
51             Transfers are used during the graph building phase. Its main purpose is to describe the combination of two L<Stations|Map::Metro::Graph::Station>
52             when the following holds true:
53              
54             =over 4
55              
56             =item There are no L<Lines|Map::Metro::Graph::Line> connecting the two stations.
57              
58             =item The two stations are a common place for transfers:
59              
60             =over 4
61              
62             =item It could be the same physical station, but known under different
63             names for different types of transport.
64              
65             =item It could be two subway stations on different lines known under different names.
66              
67             =back
68              
69             =back
70              
71             =head1 SOURCE
72              
73             L<https://github.com/Csson/p5-Map-Metro>
74              
75             =head1 HOMEPAGE
76              
77             L<https://metacpan.org/release/Map-Metro>
78              
79             =head1 AUTHOR
80              
81             Erik Carlsson <info@code301.com>
82              
83             =head1 COPYRIGHT AND LICENSE
84              
85             This software is copyright (c) 2016 by Erik Carlsson.
86              
87             This is free software; you can redistribute it and/or modify it under
88             the same terms as the Perl 5 programming language system itself.
89              
90             =cut