Re: Found rare bug in Pod::Simple

2016-03-05 Thread James E Keenan

On 03/05/2016 03:56 PM, Neil Bowers wrote:

Hi Marc, & CPAN Workers,

I’ve been looking into the final two CPAN Testers fails, and have finally got 
to the bottom of them.
The failing test is search50.t, and the problem is where it does the following:

- call survey() to get hash of name => path
- foreach name, then call find() and check it returns the same path

There are two CPAN Testers fails:

http://www.cpantesters.org/cpan/report/4ddcddb1-6c58-1014-bec3-a1032b7077ee 

http://www.cpantesters.org/cpan/report/39970866-dd9c-11e5-a3ee-89603848fe5a 


Basically the problem is that

- the pod directory has both perlpodstyle and perlpodstyle.pod in it 
(how come?!)


Is it possible that the testers have files left over from previous test 
runs?


jimk




Found rare bug in Pod::Simple

2016-03-05 Thread Neil Bowers
Hi Marc, & CPAN Workers,

I’ve been looking into the final two CPAN Testers fails, and have finally got 
to the bottom of them.
The failing test is search50.t, and the problem is where it does the following:

- call survey() to get hash of name => path
- foreach name, then call find() and check it returns the same path

There are two CPAN Testers fails:


http://www.cpantesters.org/cpan/report/4ddcddb1-6c58-1014-bec3-a1032b7077ee 


http://www.cpantesters.org/cpan/report/39970866-dd9c-11e5-a3ee-89603848fe5a 


Basically the problem is that

- the pod directory has both perlpodstyle and perlpodstyle.pod in it 
(how come?!)
- the survey() method doesn’t even find perlpodstyle, it just finds 
perlpodstyle.pod
- the find() method finds both and it finds perlpodstyle first
- so the test failed

With this understanding I reproduced the failing test.

The problem comes down to two lines of code. In _make_search_callback(), which 
is invoked by survey(), we have:

unless( m/^[-_a-zA-Z0-9]+\.(?:pod|pm|plx?)\z/is ) {

So it’s only considering files that end in .pod, .pm, .pl, or .plx

But in find() we have:

foreach my $ext ('', '.pod', '.pm', '.pl') { # possible extensions

As you can see, it first checks for no extension. Also note that it’s not 
checking for the ‘.plx’ extension, which survey handles. I’ve never come across 
anyone using the .plx extensions, but I guess for a while maybe people did:

http://www.perlmonks.org/?node_id=336713 


I think that the best fix is to make the survey() pattern match files with no 
extensions, and also files with the .plx extension.
This means that survey will scan a number of extra files, but it also scans 
them looking for pod, so it shouldn’t return any false positive. This would 
mean that survey would now find scripts that have pod in them, which it 
currently misses.

Do you agree with the proposed fix, and are there any gotchas I might be 
missing?

Cheers,
Neil



Re: Response to Rik's "Credit the first uploader" post

2016-03-05 Thread Ricardo Signes
* David Golden  [2016-02-16T00:04:05]
> I'll try to restate the problems in my own words:
> 
> (1) Last uploader as "point of contact"
> 
> How often is this really a problem?

For me, I'd say it averages a few times a month.  I'm slowly getting this down
by slogging at the problem, getting permissions transferred away from me, but
it's a pain in the rear.

> Thus, compared to Rik's original proposal, I suggest that emphasizing the
> full, current 06perms team (denoting who is primary/secondary and with some
> sort of "CPAN activity" indicator), is more beneficial than just
> emphasizing the primary maintainer over last uploader.

I think that's good/fine/okay-at-least, too.  My reason for balking at it is
*only* that metacpan pages are also swimming in information.

I'd still make the primary person's name the easiest one to want to click to
send email to. :-)  (I know people *should* be using the bug tracker, but I
also know that they often *don't.)

> Summary:
> [...]

Cool.

-- 
rjbs


signature.asc
Description: Digital signature


Working on Pod-Simple

2016-03-05 Thread Neil Bowers
A few weeks ago I mailed that I was planning to work on improving things in 
modules at the head of the river. The first of these is Pod::Simple. I’m slowly 
working towards a PR with various changes, and doing developer releases (with 
Marc’s permission). I’ll outline the changes here, to give people a chance to 
comment, since the module has so many dists downstream.

Min perl version
I’ve set min perl version to 5.006. It was previously not set in metadata, and 
all modules bar one had “require 5”. But the ChangeLog had discussion of 
changes that explicitly said anything earlier than 5.6 was no longer supported. 
If you look at CPAN Testers, you can see there are passes back to 5.6.2.
http://matrix.cpantesters.org/?dist=Pod-Simple%203.32

One module in the dist requires 5.008: Pod::Simple::TranscodeSmart. This is 
used by Pod::Simple::Transcode, which falls back onto using 
Pod::Simple::TranscodeDumb if it can’t load Pod::Simple::TranscodeSmart, which 
is why the dist passes tests on 5.6.2.

So I set it to 5.006; another option would have been 5.006002 — since there is 
evidence back that far.

Dropped “use vars”
Dropped all uses of “use vars”, and replaced with “our” as appropriate.

Add “use warnings”
I added “use warnings” to all modules, and resolved the resulting warnings. 
Some things required appropriately scoped “no warnings …”

Fixed CPAN Testers fails
As you can see from the CPAN Testers matrix link above, the current stable 
release has various failures. I’ve fixed most of them, and my current dev 
release has one particular failing test, that I’m hoping to sort out this 
weekend:
http://matrix.cpantesters.org/?dist=Pod-Simple 

This is one of my main goals: to get this green across the board.

Neil