blib/lib/Code/TidyAll/Plugin/SortLines.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Code/TidyAll/Plugin/GenericValidator.pm ↑ Summary lib/Code/TidyAll/Result.pm »
1 package Code::TidyAll::Plugin::SortLines;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 extends 'Code::TidyAll::Plugin';
9  
10 1 our $VERSION = '0.85';
11  
12 2 ▶sub transform_source {
Subroutine transform_source: called CC=1 SCAR=0.0
Pod documented
13 2 my ( $self, $source ) = @_;
14  
15 2 return join( "\n", sort( grep {/\S/} split( /\n/, $source ) ) ) . "\n";
16 }
17  
18 1 1;
19  
20 # ABSTRACT: Sort the lines in a file
21  
22 __END__
« blib/lib/Code/TidyAll/Plugin/GenericValidator.pm ↑ Summary lib/Code/TidyAll/Result.pm »