From 10dc1fa7b2a88be59fb04a0041636aaf325f6307 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 21 Mar 2018 09:02:21 +0000 Subject: [PATCH] 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 --- IkiWiki/Plugin/meta.pm | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.39.5