Create a new account
It makes kind of sense. Thinking in HTML, we have:
Which won't output the tag.
But still, it feels weird, because it's in the middle of a string which should be interpreted by perl... :-)
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>";.
A simple workaround is print "</"."%perl>";
Actually, "<\/%perl>" does the trick just fine :-)
Get More Comments