The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Foo

This is $code and so is:

  my $foo = 1;

Code might even be nested( 1 ). EOT

is($results, <<'EOT'); <h1 id="Foo">Foo</h1>

<p>This is <code class="C">C[$code]</code><!-- C --> and so is:</p>

<pre><code class="Verbatim">Verbatim[ my $foo = 1;]</code><!-- Verbatim --></pre>

<p>Code might even be <code class="C">C[nested( ]<b><code class="C">C[1]</code><!-- C --></b>C[ )]</code><!-- C -->.</p>

EOT

sub initialize { $parser = MyXHTML->new; $parser->html_header(''); $parser->html_footer(''); $parser->output_string( \$results ); $results = ''; }