diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-03-28 20:23:22 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-03-28 20:23:22 -0400 |
commit | 799b93d258bad917262ac160df74136f05d4a451 (patch) | |
tree | e56f4a9792e5b716a4b95116d08ebef8df51996c /IkiWiki/Render.pm | |
parent | b6666f5ac81ef4c8646a6290cf5c885adf0e385f (diff) | |
download | ikiwiki-799b93d258bad917262ac160df74136f05d4a451.tar ikiwiki-799b93d258bad917262ac160df74136f05d4a451.tar.gz |
don't check $@ after pagespec_translate
pagespec_translate may set $@ if it fails to parse a pagespec, but
due to memoization, this is not reliable. If a memoized call is repeated,
and $@ is already set for some other reason previously, it will remain
set through the call to pagespec_translate.
Instead, just check if pagespec_translate returns undef.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index af24df155..abafb0887 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -565,7 +565,7 @@ sub render_dependent ($$$$$$$) { if (exists $depends{$p} && ! defined $reason) { foreach my $dep (keys %{$depends{$p}}) { my $sub=pagespec_translate($dep); - next if $@ || ! defined $sub; + next unless defined $sub; # only consider internal files # if the page explicitly depends |