stevieb has asked for the wisdom of the Perl Monks concerning the following question:

I've found an interesting issue with POD rendering on MetaCPAN.

I have the following snippet in the POD for one of my modules:

=head2 send_cmd($command) Sends any arbitrary command to the LCD. (I've never tested this!). Parameters: $command Mandatory: A command to submit to the LCD. =head2 position($x, $y) Moves the cursor to the specified position on the LCD display. Parameters: $x Mandatory: Column position. C<0> is the left-most edge. $y Mandatory: Row position. C<0> is the top row.

The $x and $y variables don't show up. The code block for them does, but the variables don't. Things work as expected for the $command variable in the send_cmd(), as it shows up fine. You can see that here.

It works with Pod::Readme:

position($x, $y) Moves the cursor to the specified position on the LCD display. Parameters: $x Mandatory: Column position. 0 is the left-most edge. $y Mandatory: Row position. 0 is the top row.

...and even in view source on meta:

<h2 id="position-x-y">position($x, $y)</h2> <p>Moves the cursor to the specified position on the LCD display.</p> <p>Parameters:</p> <pre><code> $x</code></pre> <p>Mandatory: Column position. <code>0</code> is the left-most edge.</ +p> <pre><code> $y</code></pre> <p>Mandatory: Row position. <code>0</code> is the top row.</p>

...but doesn't render properly in any browser I've tested with.

I'm wondering if I should just work around this, or whether this is a known issue (I couldn't find anything by searching), and if it's worth taking up the chain or not (perhaps other specific vars don't render correctly either).

Can anyone please let me know if they are seeing what I am?

Replies are listed 'Best First'.
Re: Code rendering issue with specific vars in MetaCPAN POD
by Your Mother (Archbishop) on Aug 25, 2016 at 18:17 UTC

    I don’t see it in the browswer but it is in the page source. It is not, however, in the computed DOM; &nbsp; is. You’ve found a bug in metacpan’s (presumably JS) rendering. File a ticket. Profit!

Re: Code rendering issue with specific vars in MetaCPAN POD
by Anonymous Monk on Aug 25, 2016 at 17:50 UTC
      I turned javascript, still no problem, $x and $y display normally

        Interesting. They fail to display in my Chrome, Safari, Firefox, and IE. I turn JS off and they appear. So, it’s clearly what I said it was. :P Buttered scones for tea!

        Why it displays for you and not me… Metacpan preferences that trigger the bug? Someone with patience and interest could step through the code in a dev panel. That someone is not me today.