When placing a here-document in a CGI::FormBuilder::Source::File file,
any content after a line that contains a colon is removed within the
here-document. This is due to an error in the here-document parsing.
This problem can be verified with the attached formbuilder file. This
error can be fixed by changing line 86 of CGI/FormBuilder/Source/File.pm
from
$line = $term;
to
$line = $_;
Another way to fix it would be to put the here-document test before the
split and to include the split at the top of the else block. This fix
is nice since the split isn't necessary when parsing a here-document,
only when parsing term : line pairs.
here's this change.
my($term, $line) = split /\s*:\s*/, $_, 2;
# here string term-inator (har)
if ($here) {
if ($term eq $here) {
undef $here;
next;
} else {
$line = $_;
$term = $lterm;
}
} else {
# count leading space if it's there
to
my($term, $line);
# here string term-inator (har)
if ($here) {
if ($_ eq $here) {
undef $here;
next;
} else {
$line = $_;
$term = $lterm;
}
} else {
($term, $line) = split /\s*:\s*/, $_, 2;
# count leading space if it's there
Thanks for listening.