diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-05-22 13:11:25 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-05-22 13:11:25 -0400 |
commit | 5efaed6de66077aae72e0dbe4df35980a1af6f56 (patch) | |
tree | b1fc0ccbd0547fb068030643b39a6091081b02b5 | |
parent | f6f25758a83c20d4fd17aed7602d8828c59903b7 (diff) |
Avoid unsightly warning message when evaling broken pagespecs.
Also improve error message when a pagespec fails to parse.
-rw-r--r-- | IkiWiki.pm | 3 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 7e64518b3..0440f4020 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1262,6 +1262,7 @@ sub pagespec_translate ($) { #{{{ $code=0; } + no warnings; return eval 'sub { my $page=shift; '.$code.' }'; } #}}} @@ -1276,7 +1277,7 @@ sub pagespec_match ($$;@) { #{{{ } my $sub=pagespec_translate($spec); - return IkiWiki::FailReason->new('syntax error') if $@; + return IkiWiki::FailReason->new("syntax error in pagespec \"$spec\"") if $@; return $sub->($page, @params); } #}}} diff --git a/debian/changelog b/debian/changelog index c4919584d..fcb1598f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ ikiwiki (2.47) UNRELEASED; urgency=low * Perls older than 5.10 need to use the old method of decoding utf-8 in CGI values. Neither method will work for all versions of perl, so check version number at runtime. + * Avoid unsightly warning message when evaling broken pagespecs. + * Improve error message when a pagespec fails to parse. -- Joey Hess <joeyh@debian.org> Tue, 13 May 2008 12:30:18 -0400 |