File Coverage

blib/lib/Git/Validate/Error/LongLine.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 10 100.0


line stmt bran cond sub pod time code
1             package Git::Validate::Error::LongLine;
2             $Git::Validate::Error::LongLine::VERSION = '0.001001';
3 1     1   569 use Moo;
  1         2  
  1         6  
4              
5 1     1   245 use overload q("") => '_stringify';
  1         2  
  1         7  
6              
7             with 'Git::Validate::HasLine';
8              
9             has '+line_number' => ( default => 1 );
10              
11             has max_length => (
12             is => 'ro',
13             default => 72,
14             );
15              
16             sub _stringify {
17 4     4   1875 sprintf 'line %d is too long, max of %d chars, instead it is %d',
18             $_[0]->line_number, $_[0]->max_length, length $_[0]->line
19             }
20              
21             1;