Skip Menu |

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

Report information
The Basics
Id: 129722
Status: rejected
Priority: 0/
Queue: Pod-Checker

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

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



Subject: Accidental parsing of non POD in large text blocks, especially on public keys.
We have multiple tests that POD::Checker dislikes because of public GPG and SSL text blocks inside of strings that are being detected as POD. $>perl -MPod::Checker -e 'podchecker("test.pl", *STDOUT, "-warnings" => 1)' *** ERROR: Unknown directive: =y6KV at line 35 in file test.pl
Attaching an example program for reference.
Subject: test.pl.txt
#!perl use strict; use warnings; my $key = q{-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2.0.14 (GNU/Linux) mQENBFG2P7gBCAD2fN0JcFLjYmWZuFL/8wJvOL1jX+4eWKd59ej07E8WIGoechzB uOTq2uZsaoclOOb0IpVkkd9klm/uu03BNclPjZRqFr/iCQO2Jjw0C+FPuZRGky9e 5alKLfLutYwv/rUTou4V7ffDGsAOU3yA3f+Ydtq685Thy9qr9TU078K3nMjcPvhI X0kqyvnoJ8bLWqANxg3ST0PYREInJGmbmU0CBE3rQ5tUbWj+pizZVRzWWVemyWW7 yFNwtQbxhyTb5wDvqMkgENZJok+Kx+6bC5/lg5Hm4hUlVDZyuP213DU280kx5NqA vY+Pq2/7grZoBmljD+wRjSFK2MI4gWkb2+ftABEBAAG0NmNQYW5lbCBEZXZlbG9w bWVudCBCdWlsZCBLZXkgPHJlbGVhc2UtdGVhbUBjcGFuZWwubmV0PokBOAQTAQIA IgUCUbY/uAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQDXk2bKkg6YAD PAgAmXeGA8ZphsJIEH+5dme96aHKd014Yk1M4yLa36Ij9XWBAemEsFtsOhE1aH91 vWIAvo9xwAzuw7hLK25P3o3I7n54nL4wYtj6kR0LQrnsyrh2e7ZQ82TBYpW2BUYD v7YxKCEA0i9gcmBSxrqyp3k66TCuawDvGvoLWhET+RWjILzvGnovylLuZ+rp7oOj BLVatMhjgGdjtsIVlG1fd42Zm1bWluhMq+bZLwc7LgPMvZKP8EehrM/8qWkIMy08 U2emAtAOunf+zK6VHro25THGtujdKTSyR7+Hb6Iwnune1r1yBZRYiI+Nyyj9ZTMD nnHp/18q8p+w53aOwp23mF5QybkBDQRRtj+4AQgAtj35TX0kgwBmIb9MCew3M3Vi FNJ+g9ErzFnVi3l5H1owTN3eohz0MX71qNt/mrnM0oTm/SM9fx1xERAxQJWLM4oL RYCKVja9oW8WpRg5YaRMVu69GFyU2U8Dr2SVQBxX58SMoLJW0UgsE2tsR2Q861vH a+P9Q7fgNBc5aWJv+PrWtaTJHotWB77pqkt/B59S+OcX0IDcx22o3qHUDmAyffF7 Qa0JHH0rrVaBa5PpaTae/OztprL+dNBbumHMTypqrMOUhcQFIEaww+UTUbodothp Rf+y56hQ2uTQ/AN+zEioJHleBeW0ATqqdS1HSmHLM8CeiIvYfTEio//VFYE91QAR AQABiQEfBBgBAgAJBQJRtj+4AhsMAAoJEA15NmypIOmAm4gIAJydiXeHOdw6uGI3 t918H1PYvDiHdl6RVLzM4AM/SULhJfbFcFTudT4hTXjKD9gbf9AZg+yrih/qMBwz DhRS1i/znXF3rdnBDP2pJBtM4JLaM4tZPqId6/l86Ix7nM+Vyb69vg5NUggKMsW9 jWnUBO9RUwb9BqfBPiomxFpWYefWfAqNILzBeKBBR+YrY7xbXUKPcj9VJYZl9fWl dm+aSxLl7V3VUJFIe6CFDU13zhZ3yvjIuVkp6l//ZHcDcX014vnnh3FoElI92kFB JGFU23Vga5Tfz0Epybwio9dq1gzrZ/PIcil2MnEcUWSrIStriv4hAbf0MXcNRHOM oOV7xKU= =y6KV -----END PGP PUBLIC KEY BLOCK-----}; print $key; exit;
FYI this is how POD::Simple plans to deal with this problem. https://github.com/perl-pod/pod-simple/issues/95
Sorry for coming back so late to this issue. This is a tricky one, because it goes down to how Perl (the interpreter) itself parses the input, and to be 100% correct, Pod::Simple would need to mimic that. Ideally, there would be a way how the Perl parser would store Pod content in a way that Pod utilities could access it... But since we don't have that, I am inclined to propose a workaround, like this: #!perl use strict; use warnings; # workaround to make Pod::Simple/Checker happy: # indent each line by one blank my $key = q{ -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2.0.14 (GNU/Linux) mQENBFG2P7gBCAD2fN0JcFLjYmWZuFL/8wJvOL1jX+4eWKd59ej07E8WIGoechzB uOTq2uZsaoclOOb0IpVkkd9klm/uu03BNclPjZRqFr/iCQO2Jjw0C+FPuZRGky9e 5alKLfLutYwv/rUTou4V7ffDGsAOU3yA3f+Ydtq685Thy9qr9TU078K3nMjcPvhI X0kqyvnoJ8bLWqANxg3ST0PYREInJGmbmU0CBE3rQ5tUbWj+pizZVRzWWVemyWW7 yFNwtQbxhyTb5wDvqMkgENZJok+Kx+6bC5/lg5Hm4hUlVDZyuP213DU280kx5NqA vY+Pq2/7grZoBmljD+wRjSFK2MI4gWkb2+ftABEBAAG0NmNQYW5lbCBEZXZlbG9w bWVudCBCdWlsZCBLZXkgPHJlbGVhc2UtdGVhbUBjcGFuZWwubmV0PokBOAQTAQIA IgUCUbY/uAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQDXk2bKkg6YAD PAgAmXeGA8ZphsJIEH+5dme96aHKd014Yk1M4yLa36Ij9XWBAemEsFtsOhE1aH91 vWIAvo9xwAzuw7hLK25P3o3I7n54nL4wYtj6kR0LQrnsyrh2e7ZQ82TBYpW2BUYD v7YxKCEA0i9gcmBSxrqyp3k66TCuawDvGvoLWhET+RWjILzvGnovylLuZ+rp7oOj BLVatMhjgGdjtsIVlG1fd42Zm1bWluhMq+bZLwc7LgPMvZKP8EehrM/8qWkIMy08 U2emAtAOunf+zK6VHro25THGtujdKTSyR7+Hb6Iwnune1r1yBZRYiI+Nyyj9ZTMD nnHp/18q8p+w53aOwp23mF5QybkBDQRRtj+4AQgAtj35TX0kgwBmIb9MCew3M3Vi FNJ+g9ErzFnVi3l5H1owTN3eohz0MX71qNt/mrnM0oTm/SM9fx1xERAxQJWLM4oL RYCKVja9oW8WpRg5YaRMVu69GFyU2U8Dr2SVQBxX58SMoLJW0UgsE2tsR2Q861vH a+P9Q7fgNBc5aWJv+PrWtaTJHotWB77pqkt/B59S+OcX0IDcx22o3qHUDmAyffF7 Qa0JHH0rrVaBa5PpaTae/OztprL+dNBbumHMTypqrMOUhcQFIEaww+UTUbodothp Rf+y56hQ2uTQ/AN+zEioJHleBeW0ATqqdS1HSmHLM8CeiIvYfTEio//VFYE91QAR AQABiQEfBBgBAgAJBQJRtj+4AhsMAAoJEA15NmypIOmAm4gIAJydiXeHOdw6uGI3 t918H1PYvDiHdl6RVLzM4AM/SULhJfbFcFTudT4hTXjKD9gbf9AZg+yrih/qMBwz DhRS1i/znXF3rdnBDP2pJBtM4JLaM4tZPqId6/l86Ix7nM+Vyb69vg5NUggKMsW9 jWnUBO9RUwb9BqfBPiomxFpWYefWfAqNILzBeKBBR+YrY7xbXUKPcj9VJYZl9fWl dm+aSxLl7V3VUJFIe6CFDU13zhZ3yvjIuVkp6l//ZHcDcX014vnnh3FoElI92kFB JGFU23Vga5Tfz0Epybwio9dq1gzrZ/PIcil2MnEcUWSrIStriv4hAbf0MXcNRHOM oOV7xKU= =y6KV -----END PGP PUBLIC KEY BLOCK-----}; $key =~ s/^ //mg; print $key; exit; I am afraid there is no good solution to this one, which would be catching just the right types of mistakes. Sorry. Please reply whether you are OK with closing this ticket. -Marek
Actually we went with an indented HERE doc to solve our problem. That of course isn't a universal fix :D Your module, your call how you wanna handle it. Won't fix is a perfectly good response. Todd
Per discussion with the maintainer, I'm closing this as won't fix. This is going to be an unfortunate limitation of most POD parsing without a Perl parser to go with it.