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             {
3             $Git::Validate::Error::LongLine::VERSION = '0.001000';
4             }
5              
6 1     1   700 use Moo;
  1         2  
  1         8  
7              
8 1     1   317 use overload q("") => '_stringify';
  1         2  
  1         7  
9              
10             with 'Git::Validate::HasLine';
11              
12             has '+line_number' => ( default => 1 );
13              
14             has max_length => (
15             is => 'ro',
16             default => 72,
17             );
18              
19             sub _stringify {
20 4     4   2127 sprintf 'line %d is too long, max of %d chars, instead it is %d',
21             $_[0]->line_number, $_[0]->max_length, length $_[0]->line
22             }
23              
24             1;