line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Map::Tube::Types; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$Map::Tube::Types::VERSION = '3.42'; |
4
|
|
|
|
|
|
|
$Map::Tube::Types::AUTHORITY = 'cpan:MANWAR'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Map::Tube::Types - Attribute type definition for Map::Tube. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 3.42 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
26
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
17
|
1
|
|
|
1
|
|
7
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
586
|
use Type::Library -base, -declare => qw(Color Node NodeMap Nodes Line LineMap Lines Route Routes Table Tables); |
|
1
|
|
|
|
|
31998
|
|
|
1
|
|
|
|
|
16
|
|
20
|
1
|
|
|
1
|
|
3577
|
use Types::Standard qw(Str Object ArrayRef Map); |
|
1
|
|
|
|
|
63734
|
|
|
1
|
|
|
|
|
14
|
|
21
|
1
|
|
|
1
|
|
2180
|
use Type::Utils; |
|
1
|
|
|
|
|
5930
|
|
|
1
|
|
|
|
|
55
|
|
22
|
1
|
|
|
1
|
|
2613
|
use Map::Tube::Utils qw(is_valid_color); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
510
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
declare 'Color', |
25
|
|
|
|
|
|
|
as Str, |
26
|
|
|
|
|
|
|
where { is_valid_color($_) }, |
27
|
|
|
|
|
|
|
message { "ERROR: Invalid color name [$_]." }; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
declare 'Node', |
30
|
|
|
|
|
|
|
as Object, |
31
|
|
|
|
|
|
|
where { ref($_) eq 'Map::Tube::Node' }; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
declare 'NodeMap', |
34
|
|
|
|
|
|
|
as Map[Str, Node]; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
declare 'Nodes', |
37
|
|
|
|
|
|
|
as ArrayRef[Node]; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
declare 'Line', |
40
|
|
|
|
|
|
|
as Object, |
41
|
|
|
|
|
|
|
where { ref($_) eq 'Map::Tube::Line' }; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
declare 'LineMap', |
44
|
|
|
|
|
|
|
as Map[Str, Line]; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
declare 'Lines', |
47
|
|
|
|
|
|
|
as ArrayRef[Line]; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
declare 'Route', |
50
|
|
|
|
|
|
|
as Object, |
51
|
|
|
|
|
|
|
where { ref($_) eq 'Map::Tube::Route' }; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
declare 'Routes', |
54
|
|
|
|
|
|
|
as ArrayRef[Route]; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
declare 'Table', |
57
|
|
|
|
|
|
|
as Object, |
58
|
|
|
|
|
|
|
where { ref($_) eq 'Map::Tube::Table' }; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
declare 'Tables', |
61
|
|
|
|
|
|
|
as Map[Str, Table]; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
B. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 AUTHOR |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Mohammad S Anwar, C<< >> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 REPOSITORY |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 BUGS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or |
78
|
|
|
|
|
|
|
through the web interface at L. |
79
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on your |
80
|
|
|
|
|
|
|
bug as I make changes. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
perldoc Map::Tube::Types |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
You can also look for information at: |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=over 4 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * CPAN Ratings |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
L |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * Search CPAN |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
L |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Copyright (C) 2010 - 2016 Mohammad S Anwar. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This program is free software; you can redistribute it and / or modify it under |
115
|
|
|
|
|
|
|
the terms of the the Artistic License (2.0). You may obtain a copy of the full |
116
|
|
|
|
|
|
|
license at: |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
L |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified Versions is |
121
|
|
|
|
|
|
|
governed by this Artistic License.By using, modifying or distributing the Package, |
122
|
|
|
|
|
|
|
you accept this license. Do not use, modify, or distribute the Package, if you do |
123
|
|
|
|
|
|
|
not accept this license. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made by someone |
126
|
|
|
|
|
|
|
other than you,you are nevertheless required to ensure that your Modified Version |
127
|
|
|
|
|
|
|
complies with the requirements of this license. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service mark, |
130
|
|
|
|
|
|
|
tradename, or logo of the Copyright Holder. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge patent license |
133
|
|
|
|
|
|
|
to make, have made, use, offer to sell, sell, import and otherwise transfer the |
134
|
|
|
|
|
|
|
Package with respect to any patent claims licensable by the Copyright Holder that |
135
|
|
|
|
|
|
|
are necessarily infringed by the Package. If you institute patent litigation |
136
|
|
|
|
|
|
|
(including a cross-claim or counterclaim) against any party alleging that the |
137
|
|
|
|
|
|
|
Package constitutes direct or contributory patent infringement,then this Artistic |
138
|
|
|
|
|
|
|
License to you shall terminate on the date that such litigation is filed. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND |
141
|
|
|
|
|
|
|
CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED |
142
|
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR |
143
|
|
|
|
|
|
|
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS |
144
|
|
|
|
|
|
|
REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, |
145
|
|
|
|
|
|
|
INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE |
146
|
|
|
|
|
|
|
OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
1; # End of Map::Tube::Types |