| 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__ | ||