CSE/File/TextTroff.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 19 CC 2 SCAR 15.4
CC
2
Cov
0%
effective_object
6.0
BEGIN
2.0
CRAP 4.7
1 package App::CSE::File::TextTroff;
2 $App::CSE::File::TextTroff::VERSION = '0.016';
3 use Moose;
4 extends qw/App::CSE::File/;
5  
6 sub effective_object{
7 my ($self) = @_;
8  
9 # This could have been wrongly detected as text/troff when
10 # it is effectively application/x-perl
11 if( ( $self->content() || '' ) =~ /^(?:.*?)perl(?:.*?)\n/ ){
12 return $self->requalify('application/x-perl');
13 }
14 return $self;
15 }
16  
17  
18 __PACKAGE__->meta->make_immutable();