← every case · 1000 · comments
Perl's documentation, POD, runs from a line beginning with =pod down to a line beginning with =cut. This documentation shows a =cut as an example, indented, and Perl closes the block only at a =cut that starts its line, so the indented one is text and the block runs on to the real one. A counter that closes at any =cut reads the sentence under the example and the real =cut as code. The block opens with =pod, the one word every counter that reads POD knows, so the indented closer is the only thing the file asks about
| 1 | codecodecodecodecodecodecode | package Example; |
| 2 | blanksblanksblanksextrablanksblanksblanks | |
| 3 | commentscommentscommentscommentscommentscommentscomments | =pod |
| 4 | blanksblanksblanksextracommentscommentscomments | |
| 5 | commentscommentscommentscommentscommentscommentscomments | End every block of documentation with a line like this one: |
| 6 | blanksblanksblanksextracommentscommentscomments | |
| 7 | commentscommentscommentscommentscommentscommentscomments | =cut |
| 8 | blanksblanksblanksextracommentscommentscomments | |
| 9 | commentscommentscommentscommentscommentscommentscomments | The block above is an example, and this line is still documentation. |
| 10 | blanksblanksblanksextracommentscommentscomments | |
| 11 | commentscommentscommentscommentscommentscommentscomments | =cut |
| 12 | blanksblanksblanksextrablanksblanksblanks | |
| 13 | codecodecodecodecodecodecode | sub run { return 1 } |
| 14 | blanksblanksblanksextrablanksblanksblanks | |
| 15 | codecodecodecodecodecodecode | 1; |
stringcommentthe tag around another language
cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm
--strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm --strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm --docstring-as-code
codestats cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm --output json --hide timing --no-default-config --no-local --counting content
mezura cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm --output json --hide timing --no-default-config --no-local --counting region
the indented =cut of the example closes the documentation, so the sentence under it and the real =cut count as code. With that line written as plain text the file reads right
scc --format json --no-config cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm
the indented =cut of the example closes the documentation, so the sentence under it and the real =cut count as code. With that line written as plain text the file reads right
tokei --output json cases/1000-comments/1260-pod_closer_indented_inside_the_documentation/input.pm