bobtfish/text-markdown — pull request #19 by theory (2012-01-16 19:01:53+00:00)
Title: Eliminate `undef` warnings.

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.

Thanks,

David