- if ($@) {
- do "/usr/bin/markdown" ||
- error("failed to load Markdown.pm perl module ($@) or /usr/bin/markdown ($!)");
+ if (! $@) {
+ $markdown_sub=\&Markdown::Markdown;
+ }
+ else {
+ eval q{use Text::Markdown};
+ if (! $@) {
+ $markdown_sub=\&Text::Markdown::Markdown;
+ }
+ else {
+ do "/usr/bin/markdown" ||
+ error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $@, $!));
+ $markdown_sub=\&Markdown::Markdown;
+ }