Native/Tag.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 37 CC 2 SCAR 10.6
CC
2
Cov
0%
DEMOLISH
6.0
name
2.0
message
2.0
CRAP 2.9
1 # ABSTRACT: A libgit2 annotated tag
2  
3 package Git::Native::Tag;
4 our $VERSION = '0.006';
5 use Moo;
6 use Git::Libgit2::FFI ();
7 use Git::Native::Error qw( check_rc );
8 use Git::Native::Oid ();
9  
10 has _handle => ( is => 'ro', required => 1 ); # git_tag*
11 has _owner => ( is => 'ro', required => 1 );
12  
13 sub name { Git::Libgit2::FFI::git_tag_name( $_[0]->_handle ) }
14 sub message { Git::Libgit2::FFI::git_tag_message( $_[0]->_handle ) }
15  
16 sub target_id {
17 my $self = shift;
18 my $oidp = Git::Libgit2::FFI::git_tag_target_id( $self->_handle );
19 return Git::Native::Oid->from_ptr($oidp);
20 }
21  
22 sub DEMOLISH {
23 my $self = shift;
24 Git::Libgit2::FFI::git_tag_free( $self->{_handle} ) if $self->{_handle};
25 }
26  
27 1;
28  
29 __END__