perlancar has asked for the wisdom of the Perl Monks concerning the following question:
This should be simple, but I can't seem to find it at the moment. What module (preferably core one) can be used to escape (encode) special characters that might be interpreted as markup by a POD parser, so it will be rendered as literal? Basically the equivalent of HTML::Entities's encode_entities, or String::ShellQuote's shell_quote, for POD.
For example, I have a single-line string "Compare using Perl's <=> instead of cmp" which I want to convert to: "Compare using Perl's E<lt>=E<gt> instead of cmp".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Escaping special characters for POD output
by ikegami (Patriarch) on Dec 15, 2019 at 12:29 UTC | |
by perlancar (Hermit) on Dec 15, 2019 at 12:44 UTC | |
by perlancar (Hermit) on Dec 15, 2019 at 16:07 UTC | |
by ikegami (Patriarch) on Dec 15, 2019 at 16:24 UTC | |
by perlancar (Hermit) on Dec 16, 2019 at 02:48 UTC | |
|