Subject: | Request: sort perlpods |
Date: | Sun, 26 Oct 2008 20:31:34 -0500 |
To: | bug-pod-pom-web [...] rt.cpan.org |
From: | Elliot Shank <perl [...] galumph.com> |
Right now, Pod::POM::Web uses the order for documents that comes right from the perl summary. While I have no problem remembering that I want to look at perlre when I want regular expressions, perlrun when I want command-line options, I don't remember what order they show up under on the summary page. So I spend time searching for the page that I want. The attached patch sorts the perlpods (within the existing sections).
Thanks for putting something together that I use every day.
--- ~/src/Pod-POM-Web-1.09/lib/Pod/POM/Web.pm 2007-12-19 17:44:20.000000000 -0600
+++ Pod/POM/Web.pm 2008-10-26 20:18:58.000000000 -0500
@@ -588,7 +588,7 @@
$title =~ s/^Internals.*/Internals/;
my $leaves = "";
- foreach my $ref (@refs) {
+ foreach my $ref (sort @refs) {
my $entry = delete $perldocs->{$ref} or next;
$leaves .= leaf(label => $ref, href => $entry->{node});
}