Subject: | Old Perl 4 <<\EOF heredoc syntax can't be handled properly |
Hi, Alias,
I've been trying to use PPI to translate the GNU make test suite (in
Perl 4) to the declarative format of Ingy's Test::Base. But now I have
this problem:
PPI can't parse the following form of heredoc widely used in the
GNU test suite:
print MAKEFILE <<\EOF;
# Test comment vs semicolon parsing and line continuation
target: # this ; is just a comment \
@echo This is within a comment.
@echo There should be no errors for this makefile.
EOF
The backslash before the terminator fools the PPI parser, it seems.
Currently I have to patch the Perl 4 source before feeding it into PPI.
Hopefully it will be fixed soon :)
agentz