# (default)
# table: produces a table with the number of backlinks for each page
#
-# By Enrico Zini.
+# by Enrico Zini
package IkiWiki::Plugin::pagestats;
use warnings;
my %counts;
my $max = 0;
- foreach my $page (%IkiWiki::links) {
- if (IkiWiki::globlist_match($page, $params{pages})) {
+ foreach my $page (keys %IkiWiki::links) {
+ if (IkiWiki::pagespec_match($page, $params{pages})) {
my @bl = IkiWiki::backlinks($page);
$counts{$page} = scalar(@bl);
$max = $counts{$page} if $counts{$page} > $max;