Permalink
Browse files

Sort projects disregarding the Perl6 prefix

- If you think it's crazy, feel free to revert
- Better ask for forgiveness, etc...
  • Loading branch information...
1 parent 083aa8f commit 7eade45163c308a60d0b684e9726a6b417edab97 @cosimo cosimo committed Jun 28, 2010
Showing with 16 additions and 2 deletions.
  1. +16 −2 web/build-project-list.pl
@@ -148,8 +148,10 @@ sub get_html_list {
default_escape => 'html',
);
- my @projects = map { $projects->{$_} }
- sort { lc($a) cmp lc($b) } keys %$projects;
+ my @projects = keys %$projects;
+ @projects = sort projects_list_order @projects;
+ @projects = map { $projects->{$_} } @projects;
+
$template->param( projects => \@projects );
return $template->output;
}
@@ -161,3 +163,15 @@ sub get_json {
#$json =~ s/},/},\n/g;
return $json;
}
+
+sub projects_list_order {
+ my $prj1 = $a;
+ my $prj2 = $b;
+
+ # Disregard the [Pp]erl6-* prefix that some projects have
+ $prj1 =~ s{^perl6-}{}i;
+ $prj2 =~ s{^perl6-}{}i;
+
+ return lc($prj1) cmp lc($prj2);
+}
+

0 comments on commit 7eade45

Please sign in to comment.