I’ve found that Text::Markup sometimes is asked to parse an empty file. It opens it and passes do { local $/; <$fh> } to Text::Markdown. So an undef gets passed, resulting in these warnings:
Use of uninitialized value $text in substitution (s///) at /usr/local/perl/lib/site_perl/5.14.2/Text/Markdown.pm line 270.
Use of uninitialized value $text in substitution (s///) at /usr/local/perl/lib/site_perl/5.14.2/Text/Markdown.pm line 271.
This patch eliminates that warning, and adds tests for it, as well.
I’ve found that Text::Markup sometimes is asked to parse an empty file. It opens it and passes
do { local $/; <$fh> }
to Text::Markdown. So anundef
gets passed, resulting in these warnings:This patch eliminates that warning, and adds tests for it, as well.
Thanks,
David