File Coverage

blib/lib/WWW/Gitea/Comment.pm
Criterion Covered Total %
statement 6 13 46.1
branch 0 2 0.0
condition n/a
subroutine 2 8 25.0
pod 6 6 100.0
total 14 29 48.2


line stmt bran cond sub pod time code
1             package WWW::Gitea::Comment;
2              
3             # ABSTRACT: Gitea issue/pull-request comment entity
4              
5 3     3   18 use Moo;
  3         3  
  3         15  
6 3     3   883 use namespace::clean;
  3         3  
  3         14  
7              
8              
9             has _client => (
10             is => 'ro',
11             required => 1,
12             weak_ref => 1,
13             init_arg => 'client',
14             );
15              
16             has data => (
17             is => 'rw',
18             required => 1,
19             );
20              
21              
22 0     0 1   sub id { $_[0]->data->{id} }
23 0     0 1   sub body { $_[0]->data->{body} }
24 0     0 1   sub html_url { $_[0]->data->{html_url} }
25 0     0 1   sub created_at { $_[0]->data->{created_at} }
26 0     0 1   sub updated_at { $_[0]->data->{updated_at} }
27 0 0   0 1   sub user_login { my $u = $_[0]->data->{user}; $u ? $u->{login} : undef }
  0            
28              
29              
30              
31             1;
32              
33             __END__