aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2018-03-21 09:02:21 +0000
committerSimon McVittie <smcv@debian.org>2018-03-21 09:33:04 +0000
commit10dc1fa7b2a88be59fb04a0041636aaf325f6307 (patch)
treeaf7bb4dba1f28f228b2af3b819e71fa4827a07ac /IkiWiki
parent88c66d375884570386855792ad6652e0ed971869 (diff)
downloadikiwiki-10dc1fa7b2a88be59fb04a0041636aaf325f6307.tar
ikiwiki-10dc1fa7b2a88be59fb04a0041636aaf325f6307.tar.gz
meta: Error if we can't parse dates because Date::Parse is missing
You can still use [[!meta name="date" content="..."]] to generate <meta> 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 <smcv@debian.org>
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/meta.pm6
1 files changed, 6 insertions, 0 deletions
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) {