| 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
| |||||||||||
| 28 | : die "Mandatory parameter $a not supplied to constructor" | ||||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | return $self | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 9 | 1; | |||||||||
| 35 | |||||||||||
| 36 | __END__ | ||||||||||