Skip Menu |

This queue is for tickets about the Perl6-Perldoc CPAN distribution.

Report information
The Basics
Id: 43053
Status: open
Priority: 0/
Queue: Perl6-Perldoc

People
Owner: Nobody in particular
Requestors: hinrik.sig [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: French quotes not supported
I assume http://perlcabal.org/syn/S26.html is being generated by the latest version of Perl6::Perldoc. If so, then it's not parsing formatting codes that use french quotes (C«», etc). Examples: On lines 1346 and 1347 of S26-documentation.pod[1], under the "Formatting codes" heading, C«<...>» and C«<<<...>>>» don't get formatted correctly. Same goes with a few B«»'s elsewhere in the document. 1. http://svn.pugscode.org/pugs/docs/Perl6/Spec/S26-documentation.pod
Since «» codes don't work, I'm wondering if there is another way to write "the C«=>» operator". The only way I can think of is C<< => >>, which doesn't work as well as in Pod 5, because Pod 6 says that the surrounding spaces are significant. So I'd have to write "theC<< => >>operator", which I think we can agree is suboptimal.
Subject: Re: [rt.cpan.org #43053] French quotes not supported
Date: Thu, 30 Jul 2009 14:42:00 +0100
To: bug-Perl6-Perldoc [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> Since «» codes don't work,
They don't? They do for me (under 5.10 on MacOS). In what way don't they work? Can you send me a small example? Or perhaps just try this one: -----cut----------cut----------cut----------cut----------cut----- use Perl6::Perldoc::Parser; use Perl6::Perldoc::To::Xhtml; use strict; use warnings; my $representation = Perl6::Perldoc::Parser->parse(\*DATA, {all_pod=>1}) ->report_errors('Bad Pod'); print $representation->{tree}->to_xhtml({}); __DATA__ The C«=>» operator -----cut----------cut----------cut----------cut----------cut----- Show quoted text
> I'm wondering if there is another way to > write "the C«=>» operator".
Not easily. You could use: =config C<> :allow<E> The C<=E<gt>> operator but that's hardly an improvement. :-( Show quoted text
> The only way I can think of is C<< => >>, which doesn't work as well as > in Pod 5, because Pod 6 says that the surrounding spaces are > significant. So I'd have to write "theC<< => >>operator", which I think > we can agree is suboptimal.
It certainly is. I suppose we could consider adopting the newer Perl 6 convention that generally allows *any* kind of balanced and/or repeated delimiter (as in comments and delimited strings now). In which case you could write: The C{=>} operator But I'm nervous about allowing that, as it suddenly makes a lot more ordinary text magical. Perhaps as a compromise, we could say that only <...> and «...» can be used as single brackets, but that two-or-more brackets can be of any balanced kind. Which gives us: The C{{=>}} operator ...which seems a reasonable compromise. What do you think? Damian be used
On Thu Jul 30 09:50:35 2009, damian@conway.org wrote: Show quoted text
> I suppose we could consider adopting the newer Perl 6 > convention that generally allows *any* kind of balanced and/or repeated > delimiter (as in comments and delimited strings now). In which case you > could write: > > The C{=>} operator > > But I'm nervous about allowing that, as it suddenly makes a lot more > ordinary text magical. Perhaps as a compromise, we could say that only > <...> and «...» can be used as single brackets, but that two-or-more > brackets can be of any balanced kind. Which gives us: > > The C{{=>}} operator > > ...which seems a reasonable compromise. > > What do you think? > > Damian > > be used
I would be nervous about adding such magic too. As you wrote in S26, "Perldoc is a specification language, not a programming language". This would really be a non-issue if the «» form just worked. :) $ perl pod.pl <p>The C«=&gt;» operator </p> The above was done on an Ubuntu 9.04 system with Perl 5.10 and Perl6-Perldoc v0.0.5. It's supposed to output "The <code>=&gt;</code> operator", right? It's not just on my machine, though. As I mentioned in the original post, S26 uses the «» form in a few places, and you can see here that they're not being rendered correctly: http://perlcabal.org/syn/S26.html (e.g. under "Formatting codes").
Hm. Apparently it works if the Pod is in Latin 1: $ iconv -f UTF-8 -t ISO-8859-1 pod.pl > foo.pl $ perl foo.pl <p>The <code>=&gt;</code> operator </p>
On Thu Jul 30 13:59:23 2009, HINRIK wrote: Show quoted text
> Hm. Apparently it works if the Pod is in Latin 1: > > $ iconv -f UTF-8 -t ISO-8859-1 pod.pl > foo.pl > $ perl foo.pl > <p>The <code>=&gt;</code> operator > </p>
Or if I have a "use utf8;" at the top. Presumably, you did neither of those, yet it worked?
I guess it was just a user error by me, then. Not telling Perl the input was UTF-8. Though the spec does say that the absence of an "=encoding" directive should dictate UTF-8, I see now that #26383 suggests that Perl6::Perldoc doesn't do that yet.
Subject: Re: [rt.cpan.org #43053] French quotes not supported
Date: Thu, 30 Jul 2009 19:40:02 +0100
To: bug-Perl6-Perldoc [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hinrik Orn Sigurdsson via RT <bug-Perl6-Perldoc@rt.cpan.org>: Show quoted text
> This would really be a non-issue if the «» form just worked. :)
I know. "Hint. Hint." ;-) It *does* just work on my system with the latest beta. I've attached that to this message. Perhaps you'd like to see if it works for you? Damian

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #43053] French quotes not supported
Date: Thu, 30 Jul 2009 19:57:37 +0100
To: bug-Perl6-Perldoc [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hinrik Orn Sigurdsson via RT <bug-Perl6-Perldoc@rt.cpan.org>: Show quoted text
> I guess it was just a user error by me, then. Not telling Perl the input > was UTF-8. > > Though the spec does say that the absence of an "=encoding" directive > should dictate UTF-8
...in Perl 6... Show quoted text
> I see now that #26383 suggests that Perl6::Perldoc > doesn't do that yet.
And it's not certain that it really should, in Perl 5. It's definitely worth noting in the docs though...which I've now done. Damian