I have some text tables on my module POD, e.g. Bencher::Scenario::Accessors::Get.

I'm thinking of showing a sortable HTML table (which contains some JavaScript) instead when the POD is rendered to HTML as in sites like metacpan.org. This will be done using =begin HTML ... =end HTML POD commands.

I'd also like that the text table is not displayed on HTML output, so the user is not seeing two tables (one text and one HTML). Any idea? Two of mine so far:

1) in the =begin HTML ... =end HTML snippet, hide the text table DOM element using some CSS or JS. But this will depend on how the POD is rendered to HTML, i.e. I can make it work on metacpan.org but it might not work on other sites like say search.cpan.org which might render the HTML differently.

2) put the text table in =begin man ... =end man *and* =begin text ... =end text. But this feels dirty. What about other output formats?


In reply to Only showing part of POD when not rendered as HTML by perlancar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.