PIDS/RouteChange.pm

filter: Statementstmt 70.0% 14 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 1 totaltotal 60.7% 17 / 28 CC 3 SCAR 17.7
CC
3
Cov
64%
new
12.0
__ANON__
2.0
BEGIN
1.0
CRAP 5.9
« PIDS/Destination.pm ↑ Summary PIDS/NextPredictedStopDetail.pm »
1 package WWW::PIDS::RouteChange;
2  
3 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 9 our @ATTR = qw(Action Colour HeadboardRouteNo ID IsMainRoute RouteNo);
7  
8 {
9 9 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
10
11 9 for my $attr ( @ATTR ) {
12 0 ▶ *$attr = sub { return shift->{ $attr } }
Subroutine __ANON__: not called CC=1 SCAR=6.9
13 54 }
14 }
15  
16 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod undocumented
17 0 my ( $class, $obj ) = @_;
18 0 my $self = bless {} , $class;
19  
20 0 for my $a ( @ATTR ) {
21 defined $obj->{ $a }
22 0 ▶ ? $self->{ $a } = $obj->{ $a }
Branch: 1 branch
BranchTrueFalseTotal
defined $obj->{$a} ? : 0 0 0
23 : die "Mandatory parameter $a not supplied to constructor"
24 }
25  
26 0 return $self
27 }
28  
29 9 1;
30  
31 __END__
« PIDS/Destination.pm ↑ Summary PIDS/NextPredictedStopDetail.pm »