File Coverage

blib/lib/lib/relative/to/GitRepository.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package lib::relative::to::GitRepository;
2              
3 2     2   1018 use strict;
  2         4  
  2         56  
4 2     2   10 use warnings;
  2         4  
  2         61  
5            
6 2     2   448 use parent 'lib::relative::to::ParentContaining';
  2         300  
  2         9  
7              
8             # if $ENV{GIT_CONFIG} is set look for
9             # that, otherwise for .git/config
10             sub _find {
11 1     1   4 my($class, @args) = @_;
12 1         7 $class->SUPER::_find('.git/config', @args);
13             }
14              
15             1;
16              
17             =head1 NAME
18              
19             lib::relative::to::GitRepository
20              
21             =head1 SYNOPSIS
22              
23             use lib::relative::to GitRepository => qw(lib t/lib);
24              
25             =head1 DESCRIPTION
26              
27             A plugin for L for finding the root of a git repository and then adding some directories under it to C<@INC>.
28              
29             It works by looking for the parent directory containing C<.git/config>.