Filter::Indent::HereDoc

Whenever a here document is used, the document text and the terminator string must be flush with the left margin, even if the rest of the code block is indented.

Filter::Indent::HereDoc removes this restriction, and acts in a more DWIM kind of way, that if the terminator string is indented then that level of indent will apply to the whole document.

Example

use Filter::Indent::HereDoc;
{
  {
    print <<EOT;
    Hello, World!
    EOT
  }
}
# This will print "Hello, World!" and stop at EOT
# even though the termination string is indented.

Download