PIDS/Destination.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/RouteDestination.pm ↑ Summary PIDS/RouteChange.pm »
1 package WWW::PIDS::Destination;
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(Destination UpStop RouteNo);
7  
8 {
9 9 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 9 for my $a ( @ATTR ) {
12 0 ▶ *$a = sub { return shift->{ $a } }
Subroutine __ANON__: not called CC=1 SCAR=6.9
13 27 }
14  
15 }
16  
17  
18 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod undocumented
19 0 my ( $class, $obj ) = @_;
20 0 my $self = bless {}, $class;
21  
22 0 for my $a ( @ATTR ) {
23 defined $obj->{ $a }
24 0 ▶ ? $self->{ $a } = $obj->{ $a }
Branch: 1 branch
BranchTrueFalseTotal
defined $obj->{$a} ? : 0 0 0
25 : die "Mandatory parameter $a not supplied in constructor" ;
26 }
27  
28 0 return $self
29 }
30  
31 9 1;
32  
33 __END__
« PIDS/RouteDestination.pm ↑ Summary PIDS/RouteChange.pm »