PIDS/RouteSummary.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 1 totaltotal 60.0% 18 / 30 CC 3 SCAR 17.5
CC
3
Cov
62%
new
12.0
__ANON__
1.3
BEGIN
1.0
CRAP 5.8
« PIDS/TripSchedule.pm ↑ Summary PIDS/CoreDataChanges.pm »
1 package WWW::PIDS::RouteSummary;
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(Description DownDestination HasLowFloor HeadboardRouteNo
7 InternalRouteNo IsMainRoute LastModified MainRouteNo RouteNo
8 UpDestination);
9  
10 {
11 9 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 9 for my $attr ( @ATTR ) {
14 90 ▶ *{ __PACKAGE__ . "::$attr" } = sub {
Subroutine __ANON__: not called CC=1 SCAR=2.6
15 0 my $self = shift;
16 0 return $self->{ $attr }
17 }
18 90 }
19 }
20  
21 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod undocumented
22 0 my ( $class, $obj ) = @_;
23 0 my $self = bless {} , $class;
24  
25 0 for my $a ( @ATTR ) {
26 defined $obj->{ $a }
27 0 ▶ ? $self->{ $a } = $obj->{ $a }
Branch: 1 branch
BranchTrueFalseTotal
defined $obj->{$a} ? : 0 0 0
28 : die "Mandatory parameter $a not supplied to constructor"
29 }
30  
31 0 return $self
32 }
33  
34 9 1;
35  
36 __END__
« PIDS/TripSchedule.pm ↑ Summary PIDS/CoreDataChanges.pm »