Metro/Graph/Transfer.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Metro/Cmd.pm ↑ Summary Metro/Types.pm »
1 14 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Map::Metro::Graph::Transfer;
6  
7 # ABSTRACT: Moving between two stations without a connection between them
8 14 our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9 14 our $VERSION = '0.2404';
10  
11 14 ▶use Map::Metro::Elk;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 14 ▶use Types::Standard qw/Int/;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 14 ▶use Map::Metro::Types qw/Station/;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 14 has origin_station => (
16 is => 'ro',
17 isa => Station,
18 required => 1,
19 );
20 14 has destination_station => (
21 is => 'ro',
22 isa => Station,
23 required => 1,
24 );
25 14 has weight => (
26 is => 'ro',
27 isa => Int,
28 default => 5,
29 );
30  
31 14 __PACKAGE__->meta->make_immutable;
32  
33 14 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.2404, released 2016-04-30.
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
« Metro/Cmd.pm ↑ Summary Metro/Types.pm »