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   18 use Moose;
  4         6  
  4         24  
3 4     4   19106 use MooseX::StrictConstructor;
  4         9  
  4         31  
4 4     4   8868 use Moose::Util::TypeConstraints;
  4         9  
  4         32  
5 4     4   5616 use namespace::autoclean;
  4         5  
  4         37  
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 24 my $self = shift;
14 9         365 return $self->git->get_object( $self->sha1 );
15             }
16              
17             __PACKAGE__->meta->make_immutable;
18