]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
brief review of report
[ikiwiki.git] / IkiWiki.pm
index ee94ce659cbb5fdaffdf21da94fb50ae4e85c89f..927d6294000f85501f641b8a2b61f8ac2fe61f4b 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use Encode;
 use HTML::Entities;
 use URI::Escape q{uri_escape_utf8};
-use POSIX;
+use POSIX ();
 use Storable;
 use open qw{:utf8 :std};
 
@@ -338,7 +338,7 @@ sub getsetup () {
                type => "string",
                default => undef,
                example => '^\.htaccess$',
-               description => "regexp of normally ignored source files to include",
+               description => "regexp of normally excluded files to include",
                advanced => 1,
                safe => 0, # regexp
                rebuild => 1,
@@ -346,8 +346,8 @@ sub getsetup () {
        exclude => {
                type => "string",
                default => undef,
-               example => '\.wav$',
-               description => "regexp of source files to ignore",
+               example => '^(*\.private|Makefile)$',
+               description => "regexp of files that should be skipped",
                advanced => 1,
                safe => 0, # regexp
                rebuild => 1,
@@ -467,6 +467,13 @@ sub getsetup () {
                safe => 0,
                rebuild => 0,
        },
+       setuptype => {
+               type => "internal",
+               default => "Standard",
+               description => "perl class to use to dump setup file",
+               safe => 0,
+               rebuild => 0,
+       },
        allow_symlinks_before_srcdir => {
                type => "boolean",
                default => 0,
@@ -1819,6 +1826,7 @@ sub deptype (@) {
        return $deptype;
 }
 
+my $file_prune_regexp;
 sub file_pruned ($;$) {
        my $file=shift;
        if (@_) {
@@ -1833,8 +1841,11 @@ sub file_pruned ($;$) {
                return 0 if $file =~ m/$config{include}/;
        }
 
-       my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')';
-       return $file =~ m/$regexp/;
+       if (! defined $file_prune_regexp) {
+               $file_prune_regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')';
+               $file_prune_regexp=qr/$file_prune_regexp/;
+       }
+       return $file =~ m/$file_prune_regexp/;
 }
 
 sub define_gettext () {
@@ -2204,7 +2215,7 @@ sub match_link ($$;@) {
        my $from=exists $params{location} ? $params{location} : '';
 
        my $links = $IkiWiki::links{$page};
-       return IkiWiki::FailReason->new("$page has no links", "" => 1)
+       return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1)
                unless $links && @{$links};
        my $bestlink = IkiWiki::bestlink($from, $link);
        foreach my $p (@{$links}) {
@@ -2221,7 +2232,7 @@ sub match_link ($$;@) {
                                if match_glob($p_rel, $link, %params);
                }
        }
-       return IkiWiki::FailReason->new("$page does not link to $link", "" => 1);
+       return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1);
 }
 
 sub match_backlink ($$;@) {