- return unless exists $params{destpage};
- return match_glob($params{destpage}, $glob, @_);
-} #}}}
+ $glob=derel($glob, $params{location});
+
+ return IkiWiki::FailReason->new("cannot match destpage") unless exists $params{destpage};
+ if (match_glob($params{destpage}, $glob, @_)) {
+ return IkiWiki::SuccessReason->new("destpage matches $glob");
+ }
+ else {
+ return IkiWiki::FailReason->new("destpage does not match $glob");
+ }
+}