File Coverage

blib/lib/Git/PurePerl/DirectoryEntry.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Git::PurePerl::DirectoryEntry;
2 4     4   15 use Moose;
  4         4  
  4         22  
3 4     4   16021 use MooseX::StrictConstructor;
  4         8  
  4         27  
4 4     4   7440 use Moose::Util::TypeConstraints;
  4         6  
  4         30  
5 4     4   4770 use namespace::autoclean;
  4         7  
  4         31  
6              
7             has 'mode' => ( is => 'ro', isa => 'Str', required => 1 );
8             has 'filename' => ( is => 'ro', isa => 'Str', required => 1 );
9             has 'sha1' => ( is => 'ro', isa => 'Str', required => 1 );
10             has 'git' => ( is => 'ro', isa => 'Git::PurePerl', required => 1, weak_ref => 1 );
11              
12             sub object {
13 9     9 0 14 my $self = shift;
14 9         272 return $self->git->get_object( $self->sha1 );
15             }
16              
17             __PACKAGE__->meta->make_immutable;
18