Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

pod2html in perl-5.15.9 recognizes POD markup in verbatim sections

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


gisle at activestate

Apr 24, 2012, 2:08 PM

Post #1 of 5 (76 views)
Permalink
pod2html in perl-5.15.9 recognizes POD markup in verbatim sections

pod2html in perl-5.15.9 uses Pod::Simple::XHTML to do its work; and Pod::Simple::XHTML is different than other POD formatters in that it enables 'codes_in_verbatim' feature of Pod::Simple. This makes POD like this:

> =head1 TEXT
>
> $a++ B<if> $a < 10;
>
> more text here.

turn into (you get a bolded if-keyword):

> <h1 id="TEXT">TEXT</h1>
>
> <pre><code> $a++ <b>if</b> $a &lt; 10;</code></pre>
>
> <p>more text here.</p>

while pod2text just outputs:

> TEXT
> $a++ B<if> $a < 10;
>
> more text here.

I don't like this inconsistency. I believe this "feature" should simply be turned off. This is a patch to do that:

https://github.com/gisle/pod-simple/commit/846241382485e039ad3802af81c8c1e87afe1ac9

Any objections?

--Gisle


chromatic at wgz

Apr 24, 2012, 2:46 PM

Post #2 of 5 (69 views)
Permalink
Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections [In reply to]

On Tuesday, April 24, 2012 at 02:08 PM, Gisle Aas wrote:

> pod2html in perl-5.15.9 uses Pod::Simple::XHTML to do its work; and
Pod::Simple::XHTML is different than other POD formatters in that it enables
'codes_in_verbatim' feature of Pod::Simple.

> I don't like this inconsistency. I believe this "feature" should simply be
turned off. This is a patch to do that:

> https://github.com/gisle/pod-
simple/commit/846241382485e039ad3802af81c8c1e87afe1ac9

> Any objections?

Yes; I use this feature.

-- c


david at kineticode

Apr 24, 2012, 8:48 PM

Post #3 of 5 (69 views)
Permalink
Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections [In reply to]

On Apr 24, 2012, at 2:46 PM, chromatic wrote:

>> Any objections?
>
> Yes; I use this feature.

Better to make it an option in pod2html to turn it off. Or perhaps it turns it off by default, and you need an option to turn it on.

Best,

David


perl.p5p at rjbs

Apr 26, 2012, 6:41 PM

Post #4 of 5 (67 views)
Permalink
Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections [In reply to]

* Gisle Aas <gisle [at] activestate> [2012-04-24T17:08:33]
> pod2html in perl-5.15.9 uses Pod::Simple::XHTML to do its work; and
> Pod::Simple::XHTML is different than other POD formatters in that it enables
> 'codes_in_verbatim' feature of Pod::Simple. This makes POD like this:

pod2html should continue to produce the kind of code blocks it used to.

I also think codes_in_verbatim is a bad default, but I'm just going to fix
Pod::Html to turn it off explicitly for now.

I've also added a test.

Thanks for catching this. blead should be fixed once my test runs complete.

--
rjbs
Attachments: signature.asc (0.48 KB)


gisle at activestate

Apr 27, 2012, 3:14 PM

Post #5 of 5 (67 views)
Permalink
Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections [In reply to]

On 27. apr. 2012, at 03:41, Ricardo Signes wrote:

> * Gisle Aas <gisle [at] activestate> [2012-04-24T17:08:33]
>> pod2html in perl-5.15.9 uses Pod::Simple::XHTML to do its work; and
>> Pod::Simple::XHTML is different than other POD formatters in that it enables
>> 'codes_in_verbatim' feature of Pod::Simple. This makes POD like this:
>
> pod2html should continue to produce the kind of code blocks it used to.
>
> I also think codes_in_verbatim is a bad default, but I'm just going to fix
> Pod::Html to turn it off explicitly for now.
>
> I've also added a test.

Thanks. I had prepared a patch for adding a --codes-in-verbatim option to pod2html before I saw that you did this. The patch is attached in case you want to apply it. I don't really care much for this option myself, but apparently some do.

I filed a pull request for changing this default for Pod-Simple as well. https://github.com/theory/pod-simple/pull/27

--Gisle
Attachments: 0001-Add-codes-in-verbatim-option-to-pod2html-off-by-defa.patch (3.73 KB)

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.