minor style etc changes
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 7 Apr 2010 03:29:18 +0000 (23:29 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 7 Apr 2010 03:29:18 +0000 (23:29 -0400)
IkiWiki.pm
IkiWiki/Plugin/meta.pm

index 6d2f4dac3082502ced4073abe9c908fd90c9e5a5..2cad6a3ef4333c782e5ccfb83c3e828f8ed19e17 100644 (file)
@@ -2435,10 +2435,8 @@ sub match_ip ($$;@) {
 package IkiWiki::SortSpec;
 
 # This is in the SortSpec namespace so that the $a and $b that sort() uses
-# $IkiWiki::SortSpec::a and $IkiWiki::SortSpec::b, so that plugins' cmp
-# functions can access them easily.
-sub sort_pages
-{
+# are easily available in this namespace, for cmp functions to use them.
+sub sort_pages {
        my $f = IkiWiki::sortspec_translate(shift);
 
        return sort $f @_;
index 34e902bec4d19d98730612e6ee78cc157ce7299d..892f6b2c96a46e93e610a1690d5f19ffa50b7703 100644 (file)
@@ -300,8 +300,8 @@ sub pagetemplate (@) {
 }
 
 sub get_sort_key {
-       my $page = $_[0];
-       my $meta = $_[1];
+       my $page = shift;
+       my $meta = shift;
 
        # e.g. titlesort (also makes sense for author)
        my $key = $pagestate{$page}{meta}{$meta . "sort"};
@@ -379,7 +379,7 @@ sub match_copyright ($$;@) {
 package IkiWiki::SortSpec;
 
 sub cmp_meta {
-       my $meta = $_[0];
+       my $meta = shift;
        error(gettext("sort=meta requires a parameter")) unless defined $meta;
 
        if ($meta eq 'updated' || $meta eq 'date') {