RailRoad/Node/Switch/NE_SW_W.pm

filter: Statementstmt 78.9% 15 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod n/a totaltotal 74.0% 20 / 27 CC 1 SCAR 3.2
CC
1
Cov
79%
_next_map
2.0
_sw_exits
2.0
_transform_map
2.0
CRAP 1.4
« RailRoad/Node/Switch/E_SW_W.pm ↑ Summary RailRoad/Node/Switch/NE_S_SW.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::Switch::NE_SW_W;
14 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 $Games::RailRoad::Node::Switch::NE_SW_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 extends qw{ Games::RailRoad::Node::Switch };
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 'ne' => $_[0]->_sw_exits->[ $_[0]->_switch ],
28 'sw' => 'ne',
29 'w' => 'ne',
30 };
31 }
32  
33  
34 0 ▶sub _sw_exits { return [ qw{ e ne } ]; }
Subroutine _sw_exits: not called CC=1 SCAR=6.9
35  
36  
37 0 ▶sub _transform_map {
Subroutine _transform_map: not called CC=1 SCAR=6.9
38 0 my $prefix = 'Games::RailRoad::Node::';
39 return {
40 0 'e' => $prefix . 'Cross::E_NE_SW_W',
41 '-sw' => $prefix . 'Straight::NE_W',
42 '-w' => $prefix . 'Straight::NE_SW',
43 };
44 }
45  
46  
47 1 __PACKAGE__->meta->make_immutable;
48 1 1;
49  
50  
51 =pod
52  
53 =head1 NAME
54  
55 Games::RailRoad::Node::Switch::NE_SW_W - a given type of node...
56  
57 =head1 VERSION
58  
59 version 1.101330
60  
61 =head1 DESCRIPTION
62  
63 This package provides a node object. Refer to L<Games::RailRoad::Node>
64 for a description of the various node types.
65  
66 =head1 AUTHOR
67  
68 Jerome Quelin
69  
70 =head1 COPYRIGHT AND LICENSE
71  
72 This software is copyright (c) 2008 by Jerome Quelin.
73  
74 This is free software; you can redistribute it and/or modify it under
75 the same terms as the Perl 5 programming language system itself.
76  
77 =cut
78  
79  
80 __END__
« RailRoad/Node/Switch/E_SW_W.pm ↑ Summary RailRoad/Node/Switch/NE_S_SW.pm »