line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bootylicious::Comment; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
590
|
use strict; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
289
|
|
4
|
13
|
|
|
13
|
|
57
|
use warnings; |
|
13
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
298
|
|
5
|
|
|
|
|
|
|
|
6
|
13
|
|
|
13
|
|
61
|
use base 'Bootylicious::Document'; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
933
|
|
7
|
|
|
|
|
|
|
|
8
|
13
|
|
|
13
|
|
404
|
use Bootylicious::Article; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
107
|
|
9
|
13
|
|
|
13
|
|
265
|
use Bootylicious::Timestamp; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
69
|
|
10
|
13
|
|
|
13
|
|
240
|
use File::stat; |
|
13
|
|
|
|
|
21
|
|
|
13
|
|
|
|
|
70
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
30
|
|
|
30
|
1
|
936
|
my $self = shift->SUPER::new; |
14
|
30
|
|
|
|
|
195
|
my %params = @_; |
15
|
|
|
|
|
|
|
|
16
|
30
|
|
|
|
|
62
|
foreach my $method (qw/author email url content/) { |
17
|
120
|
100
|
|
|
|
316
|
$self->$method($params{$method}) if defined $params{$method}; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
30
|
|
|
|
|
73
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub created { |
24
|
60
|
|
|
60
|
0
|
221
|
Bootylicious::Timestamp->new(epoch => stat(shift->path)->mtime); |
25
|
|
|
|
|
|
|
} |
26
|
5
|
|
|
5
|
0
|
17
|
sub email { shift->metadata(email => @_) } |
27
|
0
|
|
|
0
|
0
|
0
|
sub url { shift->metadata(url =>) } |
28
|
|
|
|
|
|
|
|
29
|
10
|
|
|
10
|
0
|
441
|
sub content { shift->inner(content => @_) } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub number { |
32
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
|
|
8
|
my $path = $self->path; |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
18
|
my ($number) = ($path =~ m/-(\d+)$/); |
37
|
|
|
|
|
|
|
|
38
|
2
|
|
|
|
|
10
|
return $number; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub article { |
42
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $path = $self->path; |
45
|
0
|
|
|
|
|
|
$path =~ s/\.comment-(\d+)$//; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return Bootylicious::Article->new(path => $path); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |