I would expect Mason to parse it the way it does. To do it “correctly” it would have to parse the Perl code between the tags to find out whether the tag is a literal or embedded in a string or some suchlike, and attempt to do that would be foolproof. (Think, as a trivial example, print q(</%perl>); — and you can make up much hairier ones.)
The old adage... (Score:1)
Re:The old adage... (Score:1)
Re:The old adage... (Score:1)
I would expect Mason to parse it the way it does. To do it “correctly” it would have to parse the Perl code between the tags to find out whether the tag is a literal or embedded in a string or some suchlike, and attempt to do that would be foolproof. (Think, as a trivial example,
print q(</%perl>);— and you can make up much hairier ones.)A simple workaround is
print "</"."%perl>";.Re:The old adage... (Score:1)
A simple workaround is
print "</"."%perl>";Actually, :-)
"<\/%perl>"does the trick just fine