Map/Tube/Types.pm

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