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>master
parent
88c66d3758
commit
10dc1fa7b2
|
@ -162,6 +162,9 @@ sub preprocess (@) {
|
||||||
error(sprintf(gettext('cannot parse date/time: %s'), $value));
|
error(sprintf(gettext('cannot parse date/time: %s'), $value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
error $@;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elsif ($key eq 'updated') {
|
elsif ($key eq 'updated') {
|
||||||
eval q{use Date::Parse};
|
eval q{use Date::Parse};
|
||||||
|
@ -174,6 +177,9 @@ sub preprocess (@) {
|
||||||
error(sprintf(gettext('cannot parse date/time: %s'), $value));
|
error(sprintf(gettext('cannot parse date/time: %s'), $value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
error $@;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! defined wantarray) {
|
if (! defined wantarray) {
|
||||||
|
|
Loading…
Reference in New Issue