abcde has asked for the wisdom of the Perl Monks concerning the following question:
Hello
I am making a help file viewer, that reads POD files. Because POD is often used for Perl help, it highlights any code blocks and C< > spans with Perl syntax highlighting.
However, some of the files (especially the man pages, it seems) use code blocks for things that are not code - so my program tries to highlight URLs, program output, and the command-line arguments synopsis as if they were Perl code. I want to leave these as they are, not highlight them.
So, is there any way to determine whether a block of code is Perl code or not-code, or should I try something else?
I am making a help file viewer, that reads POD files. Because POD is often used for Perl help, it highlights any code blocks and C< > spans with Perl syntax highlighting.
However, some of the files (especially the man pages, it seems) use code blocks for things that are not code - so my program tries to highlight URLs, program output, and the command-line arguments synopsis as if they were Perl code. I want to leave these as they are, not highlight them.
So, is there any way to determine whether a block of code is Perl code or not-code, or should I try something else?
Back to
Seekers of Perl Wisdom