Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple CPAN distribution.

Report information
The Basics
Id: 84692
Status: rejected
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: DREBOLO [...] cpan.org
Cc: DREBOLO [...] cpan.org
AdminCc:

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



CC: DREBOLO [...] cpan.org
Subject: Breaks item line into multiple array entries.
I have a pod like the following: =item get qr{/(?<class> usr | content | post )/(?<action> delete | find )/(?<id> \d+ )}x get qr{/(?<class> usr | content | post )/(?<action> delete | find )/(?<id> \d+ )}x =cut and I get this from Pod::Simple::SimpleTree: [ "item-text", { 'start_line' => 69, '~type' => "text" }, "get qr{/(?<class", ">", " usr | content | post )/(?<action", ">", " delete | find )/(?<id", ">", " \d+ )}x" ] It breaks my item line into multiple array entries because of ">", if I remove ">" works fine. I run podchecker on that file and it reports no problems and perldoc also shows the file as it should. I attached source pod file for you debug. Thank you
Subject: TestPod.pm
package t::lib::TestPod; use Dancer2; =head1 NAME TestPod =head2 ROUTES =over =cut =item get "/in_testpod" testpod =cut get '/in_testpod' => sub { return 'get in_testpod'; }; get '/hello' => sub { return "splat"; }; =item post '/in_testpod/*' post in_testpod =cut post '/in_testpod/*' => sub { return 'post in_testpod'; }; =back =head2 SPECIALS =head3 PUBLIC =over =item get "/me:id" =cut get "/me:id" => sub { return "ME"; }; =back =head3 PRIVAT =over =item post "/me:id" post /me:id =cut post "/me:id" => sub { return "ME"; }; =item get qr{/(?<class> usr | content | post )/(?<action> delete | find )/(?<id> \d+ )}x get qr{/(?<class> usr | content | post )/(?<action> delete | find )/(?<id> \d+ )}x =cut get qr{/(?<class> usr | content | post )/(?<action> delete | find )/(?<id> \d+ )}x => sub { join(":", sort %{captures()}); }; =back =cut 1;
On 2013-04-17 05:23:20, DREBOLO wrote: Show quoted text
> I have a pod like the following: > > =item get qr{/(?<class> usr | content | post )/(?<action> delete | > find )/(?<id> \d+ )}x
`<` and `>` are special characters in Pod. Is suggest you either escape them or, better, put the whole thing into a code tag: =item C<< get qr{/(?<class> usr | content | post )/(?<action> delete | Show quoted text
> find )/(?<id> \d+ )}x >>
—David
On Wed Abr 17 12:06:05 2013, DWHEELER wrote: Show quoted text
> On 2013-04-17 05:23:20, DREBOLO wrote:
> > I have a pod like the following: > > > > =item get qr{/(?<class> usr | content | post )/(?<action> delete | > > find )/(?<id> \d+ )}x
> > `<` and `>` are special characters in Pod. Is suggest you either > escape them or, better, put the whole thing into a code tag: > > =item C<< get qr{/(?<class> usr | content | post )/(?<action> > delete |
> > find )/(?<id> \d+ )}x >>
> > —David
Hi This is the result I have running test.pl: $ perl test.pl \ [ [0] "Document", [1] { start_line 1 }, [2] [ [0] "head1", [1] { start_line 1 }, [2] "NAME" ], [3] [ [0] "Para", [1] { start_line 3 }, [2] "My Test" ], [4] [ [0] "head2", [1] { start_line 5 }, [2] "INFO" ], [5] [ [0] "Para", [1] { start_line 7 }, [2] "examples from http://perldoc.perl.org/perlpod.html" ], [6] [ [0] "head3", [1] { start_line 9 }, [2] "EXAMPLES" ], [7] [ [0] "over-text", [1] { indent 4, start_line 11, ~type "text" }, [2] [ [0] "item-text", [1] { start_line 13, ~type "text" }, [2] [ [0] "C", [1] {}, [2] "$a ", [3] "<", [4] "=", [5] ">", [6] " $b" ] ], [3] [ [0] "Para", [1] { start_line 15 }, [2] "example" ], [4] [ [0] "item-text", [1] { start_line 19, ~type "text" }, [2] "example" ], [5] [ [0] "Para", [1] { start_line 21 }, [2] [ [0] "C", [1] {}, [2] "$a <=", [3] ">", [4] " $b" ] ], [6] [ [0] "item-text", [1] { start_line 25, ~type "text" }, [2] [ [0] "C", [1] {}, [2] "$a <=", [3] ">", [4] " $b" ] ], [7] [ [0] "Para", [1] { start_line 27 }, [2] "example" ], [8] [ [0] "item-text", [1] { start_line 31, ~type "text" }, [2] [ [0] "C", [1] {}, [2] "$a ", [3] "<", [4] "=", [5] ">", [6] " $b" ] ], [9] [ [0] "Para", [1] { start_line 33 }, [2] "example" ], [10] [ [0] "item-text", [1] { start_line 37, ~type "text" }, [2] "more examples" ], [11] [ [0] "Para", [1] { start_line 39 }, [2] [ [0] "C", [1] {}, [2] "open(X, "", [3] ">", [4] ">", [5] "thing.dat") || die $!" ], [3] " ", [4] [ [0] "C", [1] {}, [2] "$foo-", [3] ">", [4] "bar();" ] ] ] ] Can you please have a look, and see if you get the same thing or am I doing something wrong. Thank you Dinis
Subject: test.pod
=head1 NAME My Test =head2 INFO examples from http://perldoc.perl.org/perlpod.html =head3 EXAMPLES =over =item C<$a E<lt>=E<gt> $b> example =cut =item example C<< $a <=> $b >> =cut =item C<< $a <=> $b >> example =cut =item C<< $a E<lt>=E<gt> $b >> example =cut =item more examples C<<< open(X, ">>thing.dat") || die $! >>> C<< $foo->bar(); >> =cut =back
Subject: test.pl
use strict; use warnings; use Pod::Simple::SimpleTree; use Data::Printer; my $parser = Pod::Simple::SimpleTree->new->parse_file( "test.pod" ); my $pod_dataref = $parser->root; p $pod_dataref;
Subject: Re: [rt.cpan.org #84692] Breaks item line into multiple array entries.
Date: Thu, 25 Apr 2013 13:17:29 -0700
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Apr 17, 2013, at 4:18 PM, Dinis Manuel Martins Rebolo via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> This is the result I have running test.pl:
I don't pay much attention to how Pod::Simple organizes things internally. Is there an output you're not getting? What are you trying to do? Best, David
Hi David, I use Pod::Simple::SimpleTree; here (https://metacpan.org/source/SUKRIA/Dancer2-0.04/lib/Dancer2/Test.pm in sub route_pod_coverage) to check if each Dancer2 app route have proper documentation. I can change the code there to also be expecting an array ref, but I thought this was not the expected result. Tell me if I should change the code from my side or if you are thinking in change this to always return a string there. Thank you On Thu Abr 25 16:17:52 2013, DWHEELER wrote: Show quoted text
> On Apr 17, 2013, at 4:18 PM, Dinis Manuel Martins Rebolo via RT <bug- > Pod-Simple@rt.cpan.org> wrote: >
> > This is the result I have running test.pl:
> > I don't pay much attention to how Pod::Simple organizes things > internally. Is there an output you're not getting? What are you trying > to do? > > Best, > > David >
Subject: Re: [rt.cpan.org #84692] Breaks item line into multiple array entries.
Date: Fri, 26 Apr 2013 08:54:03 -0700
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Apr 26, 2013, at 12:39 AM, "Dinis Manuel Martins Rebolo via RT" <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> Tell me if I should change the code from my side or if you are thinking in change this to always return a string there.
I honesty don't know. I have never used SimpleTree, and know nothing about it. Any of you other Pod::Simple maintainers have an idea? David
On Fri Apr 26 09:54:26 2013, DWHEELER wrote: Show quoted text
> On Apr 26, 2013, at 12:39 AM, "Dinis Manuel Martins Rebolo via RT" > <bug-Pod-Simple@rt.cpan.org> wrote: >
> > Tell me if I should change the code from my side or if you are > > thinking in change this to always return a string there.
> > I honesty don't know. I have never used SimpleTree, and know nothing > about it. > > Any of you other Pod::Simple maintainers have an idea? > > David
I believe this is expected behavior. The docs for SimpleTree indicate that nodes have an array of subnodes, except those which are a simple text string. Strings that contain things like '>' are not simple text strings, as the '>' is special, and so when properly escaped so they look like E<gt>, they become subnodes. Even if it handles things that aren't properly escaped without complaint, doesn't mean they aren't really subnodes. So I think this ticket should be closed.
It's been a month since I proposed closing this ticket, without any response. So I'm rejecting it.