RailRoad/Node/Straight/E_W.pm

filter: Statementstmt 85.0% 17 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod n/a totaltotal 82.1% 23 / 28 CC 1 SCAR 2.2
CC
1
Cov
85%
_next_map
2.0
_transform_map
2.0
BEGIN
1.0
CRAP 1.2
« RailRoad/Node/Straight/SE_W.pm ↑ Summary RailRoad/Node/Switch.pm »
1 #
2 # This file is part of Games-RailRoad
3 #
4 # This software is copyright (c) 2008 by Jerome Quelin.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 package Games::RailRoad::Node::Straight::E_W;
14 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 $Games::RailRoad::Node::Straight::E_W::VERSION = '1.101330';
16 }
17 # ABSTRACT: a given type of node...
18  
19 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶use base qw{ Games::RailRoad::Node::Straight };
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22  
23 # -- private methods
24  
25 0 ▶sub _next_map {
Subroutine _next_map: not called CC=1 SCAR=6.9
26 return {
27 0 'e' => 'w',
28 'w' => 'e',
29 };
30 }
31  
32  
33 0 ▶sub _transform_map {
Subroutine _transform_map: not called CC=1 SCAR=6.9
34 0 my $prefix = 'Games::RailRoad::Node::';
35 return {
36 0 'ne' => $prefix . 'Switch::E_NE_W',
37 'nw' => $prefix . 'Switch::E_NW_W',
38 'se' => $prefix . 'Switch::E_SE_W',
39 'sw' => $prefix . 'Switch::E_SW_W',
40 '-e' => $prefix . 'Half::W',
41 '-w' => $prefix . 'Half::E',
42 };
43 }
44  
45  
46 1 __PACKAGE__->meta->make_immutable;
47 1 1;
48  
49  
50 =pod
51  
52 =head1 NAME
53  
54 Games::RailRoad::Node::Straight::E_W - a given type of node...
55  
56 =head1 VERSION
57  
58 version 1.101330
59  
60 =head1 DESCRIPTION
61  
62 This package provides a node object. Refer to L<Games::RailRoad::Node>
63 for a description of the various node types.
64  
65 =head1 AUTHOR
66  
67 Jerome Quelin
68  
69 =head1 COPYRIGHT AND LICENSE
70  
71 This software is copyright (c) 2008 by Jerome Quelin.
72  
73 This is free software; you can redistribute it and/or modify it under
74 the same terms as the Perl 5 programming language system itself.
75  
76 =cut
77  
78  
79 __END__
« RailRoad/Node/Straight/SE_W.pm ↑ Summary RailRoad/Node/Switch.pm »