NAME
App::perlimports::Sorter - Sort a document's include statements
VERSION
version 0.000064
SYNOPSIS
my $sorter = App::perlimports::Sorter->new(
logger => $logger,
source => $source_string,
);
my $sorted = $sorter->sorted_document;
sorted_document
Returns the source with each contiguous section of use/require statements sorted per the --sort rules. Pragmas and version requires are hoisted, ## no perlimports and other anchors keep their slots, and attached comments travel with their include. Returns the original source unchanged when there is nothing to sort.
AUTHOR
Olaf Alders <olaf@wundercounter.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Olaf Alders.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.