From: Simon McVittie Date: Wed, 21 Mar 2018 09:02:21 +0000 (+0000) Subject: meta: Error if we can't parse dates because Date::Parse is missing X-Git-Tag: 3.20190207~192 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/10dc1fa7b2a88be59fb04a0041636aaf325f6307 meta: Error if we can't parse dates because Date::Parse is missing You can still use [[!meta name="date" content="..."]] to generate tags that are not interpreted, but the common case for [[!meta date="..."]] is that you want to change the ctime, and that won't work without Date::Parse. Signed-off-by: Simon McVittie --- diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 4a9852b72..cd367da70 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -162,6 +162,9 @@ sub preprocess (@) { error(sprintf(gettext('cannot parse date/time: %s'), $value)); } } + else { + error $@; + } } elsif ($key eq 'updated') { eval q{use Date::Parse}; @@ -174,6 +177,9 @@ sub preprocess (@) { error(sprintf(gettext('cannot parse date/time: %s'), $value)); } } + else { + error $@; + } } if (! defined wantarray) {