Head1
Head2
Contents here EOPOD <<"EOHTML"; <h1>Head1</h1> <h2>Head2</h2> <p>Contents here</p> EOHTML
dotest "Formatting (from Pod)", pod => <<"EOPOD", =pod
bold <bold>
italic
code code->with->arrows
underline EOPOD <<"EOHTML"; <p><strong>bold</strong> <strong><bold></strong></p> <p><em>italic</em></p> <p><tt>code</tt> <tt>code->with->arrows</tt></p> <p><a href="target://">link</a> <a href="https://metacpan.org/pod/Module::Here">Module::Here</a></p> <p><u>underline</u></p> EOHTML
# POD can't do strikethrough so we'll ask Markdown dotest "Formatting (from Markdown)", markdown => <<"EOMARKDOWN", ~~strikethrough~~ EOMARKDOWN <<"EOHTML"; <p><s>strikethrough</s></p> EOHTML
dotest "Verbatim", pod => <<"EOPOD", =head1 EXAMPLE
use v5.14;
use warnings;
say "Hello, world";
EOPOD
<<"EOHTML";
<h1>EXAMPLE</h1>
<pre>
use v5.14;
use warnings;
say "Hello, world";</pre>
EOHTML
dotest "Bullet lists", pod => <<"EOPOD", =over 4
First
Second
Third
dotest "Numbered lists", pod => <<"EOPOD", =over 4
First
Second
Third
dotest "Definition lists", pod => <<"EOPOD", =over 4
- First
-
The first item
- Second
-
The second item
- Third
-
The third item
Has two paragraphs
dotest "Nested lists", pod => <<"EOPOD", =over 4
Item
Inner item
dotest "Tables", markdown => <<"EOMARKDOWN", | Heading | Here | |---------|------| |Data in |Columns|
| Left | Centre | Right | | :--- | :---: | ---: | | XX | XX | XX | EOMARKDOWN <<"EOHTML"; <table> <tr> <th>Heading</th> <th>Here</th> </tr> <tr> <td>Data in</td> <td>Columns</td> </tr> </table> <table> <tr> <th>Left</th> <th style="text-align: center;">Centre</th> <th style="text-align: right;">Right</th> </tr> <tr> <td>X <td style="text-align: center;">X <td style="text-align: right;">X </tr> </table> EOHTML
done_testing;
9 POD Errors
The following errors were encountered while parsing the POD:
- Around line 50:
Deleting unknown formatting code U<>
- Around line 86:
'=item' outside of any '=over'
- Around line 98:
=back doesn't take any parameters, but you said =back EOPOD <<"EOHTML"; <ul> <li>First</li> <li>Second</li> <li>Third</li> </ul> EOHTML
- Around line 111:
'=item' outside of any '=over'
- Around line 123:
=back doesn't take any parameters, but you said =back EOPOD <<"EOHTML"; <ol> <li>First</li> <li>Second</li> <li>Third</li> </ol> EOHTML
- Around line 136:
'=item' outside of any '=over'
- Around line 150:
=back doesn't take any parameters, but you said =back EOPOD <<"EOHTML"; <dl> <dt>First</dt> <dd>The first item</dd> <dt>Second</dt> <dd>The second item</dd> <dt>Third</dt> <dd>The third item</dd> <p>Has two paragraphs</p> </dl> EOHTML
- Around line 167:
'=item' outside of any '=over'
- Around line 179:
=back doesn't take any parameters, but you said =back EOPOD <<"EOHTML"; <ul> <li>Item</li> <ul> <li>Inner item</li> </ul> </ul> EOHTML