line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPAN::Source::Package; |
2
|
1
|
|
|
1
|
|
1820
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
use base qw(Class::Accessor::Fast::XS); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
557
|
|
5
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
6
|
|
|
|
|
|
|
package |
7
|
|
|
|
|
|
|
version |
8
|
|
|
|
|
|
|
path |
9
|
|
|
|
|
|
|
dist |
10
|
|
|
|
|
|
|
)); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub fetch_pm { |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
my $path = $self->package; |
15
|
|
|
|
|
|
|
$path =~ s{::}{/}g; |
16
|
|
|
|
|
|
|
$path = 'lib/' . $path . '.pm'; |
17
|
|
|
|
|
|
|
return $self->dist->fetch_source_file( $path ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub data { |
21
|
|
|
|
|
|
|
my $self = shift; |
22
|
|
|
|
|
|
|
my @attrs = $self->meta->get_all_attributes; |
23
|
|
|
|
|
|
|
my $data = { }; |
24
|
|
|
|
|
|
|
for my $attr ( @attrs ) { |
25
|
|
|
|
|
|
|
next if $attr->name =~ /^_/; # skip private attribute |
26
|
|
|
|
|
|
|
$data->{ $attr->name } = $attr->get_value( $self ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
return $data; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |