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 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = qv('v5.1.0');
8 1 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.1.0
17  
18 =cut
19  
20 1 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 1 ▶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 1 ▶use Types::Standard qw(Str InstanceOf ArrayRef Map);
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use Type::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶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 1 declare 'Node',
33 as InstanceOf['Map::Tube::Node'];
34  
35 1 declare 'NodeMap',
36 as Map[Str, Node];
37  
38 1 declare 'Nodes',
39 as ArrayRef[Node];
40  
41 1 declare 'Line',
42 as InstanceOf['Map::Tube::Line'];
43  
44 1 declare 'LineMap',
45 as Map[Str, Line];
46  
47 1 declare 'Lines',
48 as ArrayRef[Line];
49  
50 1 declare 'Route',
51 as InstanceOf['Map::Tube::Route'];
52  
53 1 declare 'Routes',
54 as ArrayRef[Route];
55  
56 1 declare 'Table',
57 as InstanceOf['Map::Tube::Table'];
58  
59 1 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 * CPAN Ratings
95  
96 L<http://cpanratings.perl.org/d/Map-Tube>
97  
98 =item * Search MetaCPAN
99  
100 L<https://metacpan.org/dist/Map-Tube/>
101  
102 =back
103  
104 =head1 LICENSE AND COPYRIGHT
105  
106 Copyright (C) 2010 - 2026 Mohammad Sajid Anwar.
107  
108 This program is free software; you can redistribute it and / or modify it under
109 the terms of the the Artistic License (2.0). You may obtain a copy of the full
110 license at:
111  
112 L<http://www.perlfoundation.org/artistic_license_2_0>
113  
114 Any use, modification, and distribution of the Standard or Modified Versions is
115 governed by this Artistic License.By using, modifying or distributing the Package,
116 you accept this license. Do not use, modify, or distribute the Package, if you do
117 not accept this license.
118  
119 If your Modified Version has been derived from a Modified Version made by someone
120 other than you,you are nevertheless required to ensure that your Modified Version
121 complies with the requirements of this license.
122  
123 This license does not grant you the right to use any trademark, service mark,
124 tradename, or logo of the Copyright Holder.
125  
126 This license includes the non-exclusive, worldwide, free-of-charge patent license
127 to make, have made, use, offer to sell, sell, import and otherwise transfer the
128 Package with respect to any patent claims licensable by the Copyright Holder that
129 are necessarily infringed by the Package. If you institute patent litigation
130 (including a cross-claim or counterclaim) against any party alleging that the
131 Package constitutes direct or contributory patent infringement,then this Artistic
132 License to you shall terminate on the date that such litigation is filed.
133  
134 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
135 CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
136 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
137 NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
138 REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
139 INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
140 OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
141  
142 =cut
143  
144 1 1; # End of Map::Tube::Types
« Map/Tube/Cookbook.pm ↑ Summary Map/Tube/Node.pm »