my @manifest =
grep {! m!^pod/[^. \t]+\.pod.*!}
grep {! m!^README\.(\S+)! || $state->{ignore}{$1}} split "\n", $prev;
- join "\n", (
- # Dictionary order - fold and handle non-word chars as nothing
- map { $_->[0] }
- sort { $a->[1] cmp $b->[1] || $a->[0] cmp $b->[0] }
- map { my $f = lc $_; $f =~ s/[^a-z0-9\s]//g; [ $_, $f ] }
- @manifest,
- &generate_manifest_pod(),
- &generate_manifest_readme()), '';
+ # NOTE - the sort code here is shared with Porting/manisort currently.
+ # If you change one, change the other. Or refactor them. :-)
+ join "\n", sort_manifest(
+ @manifest,
+ &generate_manifest_pod(),
+ &generate_manifest_readme()
+ ),
+ '', # elegant way to add a newline to the end
+ ;
}
sub do_nmake {