-
Notifications
You must be signed in to change notification settings - Fork 16
Description
I've noticed that the behavior of all Pod::To::* renderers are not following a rule I found in some old text. It states;
Pod sections may be used reliably as multiline comments in Perl 6. Unlike in Perl 5, Pod syntax now lets you use =begin comment and =end comment to delimit a Pod block correctly without the need for =cut. (In fact, =cut is now gone.) The format name does not have to be comment -- any unrecognized format name will do to make it a comment. (However, bare =begin and =end probably aren't good enough, because all comments in them will show up in the formatted output.)
Instead when rendering a piece of code like
=begin Gnome-T
=begin code
my Int $i = 10;
=end code
=end Gnome-T
It generates HTML code, where the format name becomes a header and code is visible. (Also noticed for Text and Markdown.
…
<body class="pod">
<div id="___top"></div>
<div class="pod-body no-toc">
<section><h1>Gnome-T</h1>
<pre class="pod-block-code">my Int $i = 10;
</pre>
</section>
…
I needed the code block to keep the text as-is. Another experiment where I used a
comment block, the code block was not necessary.
At the moment I can get by with =begin comment :Gnome-T but the idea above is shorter and shows better what it is needed for.