line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Car::AbstractFactory; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
310666
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
109
|
|
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
533
|
use Class::Interface; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
268
|
|
6
|
|
|
|
|
|
|
abstract; |
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
1688
|
eval qq| |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
9
|
|
|
|
|
|
|
use Class::AccessorMaker { |
10
|
|
|
|
|
|
|
createdCars => [], |
11
|
|
|
|
|
|
|
}; |
12
|
|
|
|
|
|
|
|; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
if ( $@ ) { |
15
|
3
|
|
|
3
|
|
19
|
no strict 'refs'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
481
|
|
16
|
|
|
|
|
|
|
*{ __PACKAGE__ . "::createdCars" } = sub { |
17
|
1
|
|
|
1
|
|
2
|
my ( $self, $what ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
3
|
if ( defined $what ) { |
20
|
0
|
|
|
|
|
0
|
$self->{$what} = $what; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
50
|
|
|
122
|
return $self->{$what} || []; |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub createCar; # this is the abstract method |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub rememberCreatedCar { |
30
|
1
|
|
|
1
|
0
|
2
|
my ( $self, $car ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
2
|
push @{$self->createdCars}, $car; |
|
1
|
|
|
|
|
5
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |