Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections

2012-04-25 Thread chromatic
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


Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections

2012-04-25 Thread Shawn H Corey

On 12-04-24 11:48 PM, David E. Wheeler wrote:

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.


I agree. It's best to have it conform to the behaviour of the rest and 
have an option of changing that behaviour. Which leads to the question: 
do any of the rest have this option and, if not, should they?



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

[updated for today's programmers]
Show me your code and conceal your interfaces, and I shall continue
to be mystified. Show me your interfaces, and I won't usually need
your code; it'll be obvious.
-- Fred Brooks

Don't be clever; being great is good enough.


Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections

2012-04-25 Thread Russ Allbery
Shawn H Corey shawnhco...@gmail.com writes:

 I agree. It's best to have it conform to the behaviour of the rest and
 have an option of changing that behaviour. Which leads to the question:
 do any of the rest have this option and, if not, should they?

It's directly contrary to the POD specification and the way that POD has
always worked, including the embedded assumptions of thousands of existing
POD documents, so it will take some convincing for me to implement it for
my formatters.  Those facts make it an edge feature that can only be used
by particular individuals with their private documents and could never be
enabled by, say, ExtUtils::MakeMaker, which makes it a low priority for
development and support.

I think a better approach would have been to add a new command (=formatted
or something) that had these semantics rather than changing the
interpretation of existing verbatim paragraphs.

That said, I don't object to pod2html having an option to enable this
behavior.  All the POD formatters have, from time to time, had options to
enable various non-POD features.  But I certainly strenuously object to
having it on by default, since it reinterprets existing documents in ways
that could be destructive.  (For example, it would not format perlpodspec
correctly!)

-- 
Russ Allbery (r...@stanford.edu) http://www.eyrie.org/~eagle/


Re: pod2html in perl-5.15.9 recognizes POD markup in verbatim sections

2012-04-25 Thread Shawn H Corey

On 12-04-25 11:22 AM, Russ Allbery wrote:

I think a better approach would have been to add a new command (=formatted
or something) that had these semantics rather than changing the
interpretation of existing verbatim paragraphs.


It would be better if it used the =begin/=for/=end syntax:

=begin verbatim

...

=end verbatim

=for verbatim
...


--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

[updated for today's programmers]
Show me your code and conceal your interfaces, and I shall continue
to be mystified. Show me your interfaces, and I won't usually need
your code; it'll be obvious.
-- Fred Brooks

Don't be clever; being great is good enough.


Non-ASCII data in POD

2012-04-25 Thread Grant McLean
Hi POD people

There's been a discussion on #metacpan about non-ASCII characters in POD
being rendered incorrectly on the metacpan.org web site.

The short story is that some people use utf8 characters without
including: =encoding utf8.  Apparently the metacpan tool chain assumes
latin1 encoding, but with the right encoding declaration, the characters
would be rendered correctly.

The latest perlpodspec seems to imply an ASCII default and anything else
should have an =encoding.  In the implementation notes section it also
suggests a heuristic of checking whether the first highbit byte-sequence
is valid as UTF-8 and default to UTF-8 if so and Latin-1 otherwise.

This raises two issues:

1) Pod::Simple (as used by metacpan) does not seem to implement this
   heuristic
2) We need to educate people who are not aware of the =encoding command

My thoughts on the second issue are that we could modify Pod::Simple to
'whine' if it sees non-ASCII bytes but no =encoding.  This in turn would
cause Test::Pod to pick up the error and help people fix it.

I'd be happy to look at implementing both these things if it's agreed
they're a good idea.

Regards
Grant