line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPAN::Testers::WWW::Reports::Report; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
30775
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
137
|
|
4
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
97
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
18
|
use vars qw($VERSION); |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
254
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.06'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
# Library Modules |
11
|
|
|
|
|
|
|
|
12
|
4
|
|
|
4
|
|
20
|
use Carp; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
1017
|
|
13
|
|
|
|
|
|
|
our $AUTOLOAD; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
16
|
|
|
|
|
|
|
# Variables |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my @methods = ( |
19
|
|
|
|
|
|
|
"ostext", "osvers", "perl", "platform", |
20
|
|
|
|
|
|
|
"version", "csspatch", "distversion", "id", |
21
|
|
|
|
|
|
|
"status", "state", "cssperl", "dist", |
22
|
|
|
|
|
|
|
"distribution", "osname", "guid", "grade", |
23
|
|
|
|
|
|
|
"archname", "action", "url" |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
my %permitted_methods = map { $_ => 1 } @methods; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
28
|
|
|
|
|
|
|
# The Application Programming Interface |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub new { |
31
|
1
|
|
|
1
|
1
|
3
|
my ( $class, $self ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
2
|
bless $self, 'CPAN::Testers::WWW::Reports::Report'; |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
9
|
$self->{_permitted} = \%permitted_methods; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
37
|
return $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
|
0
|
sub DESTROY {} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub AUTOLOAD { |
43
|
1
|
|
|
1
|
|
565
|
my $self = shift; |
44
|
1
|
50
|
|
|
|
4
|
my $type = ref($self) |
45
|
|
|
|
|
|
|
or croak "$self is not an object"; |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
1
|
my $name = $AUTOLOAD; |
48
|
1
|
|
|
|
|
6
|
$name =~ s/.*://; # strip fully-qualified portion |
49
|
|
|
|
|
|
|
|
50
|
1
|
50
|
|
|
|
5
|
unless ( exists $self->{_permitted}->{$name} ) { |
51
|
0
|
|
|
|
|
0
|
croak "Can't access `$name' field in class $type"; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
1
|
50
|
|
|
|
3
|
if (@_) { |
55
|
0
|
|
|
|
|
0
|
return $self->{$name} = shift; |
56
|
|
|
|
|
|
|
} else { |
57
|
1
|
|
|
|
|
5
|
return $self->{$name}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |