line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPAN::Testers::WWW::Reports::Report; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
4847
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
123
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
128
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
12
|
use vars qw($VERSION); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
140
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.05'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
# Library Modules |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
12
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
864
|
|
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
|
|
|
|
|
4
|
bless $self, 'CPAN::Testers::WWW::Reports::Report'; |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
13
|
$self->{_permitted} = \%permitted_methods; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
45
|
return $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
|
0
|
sub DESTROY {} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub AUTOLOAD { |
43
|
1
|
|
|
1
|
|
848
|
my $self = shift; |
44
|
1
|
50
|
|
|
|
6
|
my $type = ref($self) |
45
|
|
|
|
|
|
|
or croak "$self is not an object"; |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
2
|
my $name = $AUTOLOAD; |
48
|
1
|
|
|
|
|
7
|
$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
|
|
|
|
6
|
if (@_) { |
55
|
0
|
|
|
|
|
0
|
return $self->{$name} = shift; |
56
|
|
|
|
|
|
|
} else { |
57
|
1
|
|
|
|
|
6
|
return $self->{$name}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |