File Coverage

blib/lib/App/Prove/Plugin/TermTableStty.pm
Criterion Covered Total %
statement 12 12 100.0
branch 3 4 75.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1             package App::Prove::Plugin::TermTableStty;
2              
3 2     2   219447 use strict;
  2         10  
  2         58  
4 2     2   11 use warnings;
  2         4  
  2         46  
5 2     2   45 use 5.008001;
  2         8  
6              
7             # ABSTRACT: Set the size of the console for Term::Table using stty size
8             our $VERSION = '0.01'; # VERSION
9              
10              
11             sub load
12             {
13 2 50   2 0 12505 return if $ENV{TERM_TABLE_SIZE};
14 2         8900 my $size = `stty size`;
15 2 100       114 if($size =~ /[0-9]+\s+([0-9]+)/)
16             {
17 1         82 $ENV{TERM_TABLE_SIZE} = $1;
18             }
19             }
20              
21             1;
22              
23             __END__