line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5
|
use Map::Metro::Standard::Moops; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
2
|
1
|
|
|
1
|
|
2351
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.2300'; # VERSION |
6
|
|
|
|
|
|
|
# PODNAME: Map::Metro::Graph::LineStation |
7
|
|
|
|
|
|
|
# ABSTRACT: A station on a specific line |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
1666
|
class Map::Metro::Graph::LineStation { |
|
1
|
|
|
1
|
|
78
|
|
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
71
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
287
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
65
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
111
|
|
|
1
|
|
|
|
|
36
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
4131
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
6587
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
4513
|
|
|
1
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
81
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
224
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
1296
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
6402
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
159
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
5406
|
|
|
1
|
|
|
|
|
20
|
|
|
1
|
|
|
|
|
164
|
|
|
0
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
16
|
has line_station_id => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => Int, |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
); |
16
|
1
|
|
|
|
|
4745
|
has station => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => Station, |
19
|
|
|
|
|
|
|
required => 1, |
20
|
|
|
|
|
|
|
); |
21
|
1
|
|
|
|
|
4240
|
has line => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
isa => Line, |
24
|
|
|
|
|
|
|
required => 1, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
1
|
0
|
|
1
|
|
33240
|
method possible_on_same_line(LineStation $other) { |
|
1
|
0
|
|
1
|
|
3
|
|
|
1
|
0
|
|
0
|
|
189
|
|
|
1
|
0
|
|
|
|
6
|
|
|
1
|
0
|
|
|
|
2
|
|
|
1
|
|
|
|
|
231
|
|
|
1
|
|
|
|
|
4152
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $station_lines = [ map { $_->id } $self->station->all_lines ]; |
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $other_station_lines = [ map { $_->id } $other->station->all_lines ]; |
|
0
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
my $is_possible = !!List::Compare->new($station_lines, $other_station_lines)->get_intersection; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
return $is_possible; |
34
|
|
|
|
|
|
|
} |
35
|
1
|
0
|
|
1
|
|
2299
|
method on_same_line(LineStation $other) { |
|
1
|
0
|
|
1
|
|
3
|
|
|
1
|
0
|
|
0
|
|
169
|
|
|
1
|
0
|
|
|
|
5
|
|
|
1
|
0
|
|
|
|
2
|
|
|
1
|
|
|
|
|
115
|
|
|
1
|
|
|
|
|
238
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return $self->line->id eq $other->line->id; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=pod |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=encoding UTF-8 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 NAME |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Map::Metro::Graph::LineStation - A station on a specific line |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 VERSION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Version 0.2300, released 2016-01-14. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 DESCRIPTION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
A line station is the concept of a specific L<Station|Map::Metro::Graph::Station> on a specific L<Line|Map::Metro::Graph::Line>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 METHODS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 line_station_id() |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Returns the internal line station id. Do not depend on this between executions. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 station() |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Returns the L<Station|Map::Metro::Graph::Station> object. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 line() |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Returns the L<Line|Map::Metro::Graph::Line> object. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SOURCE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<https://github.com/Csson/p5-Map-Metro> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 HOMEPAGE |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<https://metacpan.org/release/Map-Metro> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Erik Carlsson <info@code301.com> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Erik Carlsson. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
91
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |