Skip Menu |

This queue is for tickets about the Module-CPANTS-Analyse CPAN distribution.

Report information
The Basics
Id: 25207
Status: resolved
Priority: 0/
Queue: Module-CPANTS-Analyse

People
Owner: domm [...] cpan.org
Requestors: hemingway [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.69
Fixed in: 0.72



Subject: Test failures under MSWin32 for Module::CPANTS::Analyse
Thomas, I have reproduced some of the issues listed at http://www.nntp.perl.org/group/perl.cpan.testers/2006/11/msg370405.html when installing on my machine (MS Windows 2000 running Module::CPANTS::Analyse 0.69 on Perl 5.8.7) The first issue (test 'uses' in analyse.y line 25) is caused by the assumption in Module::CPANTS::Kwalitee::Uses.pm that the path seperator is '/' (line 23) I changed the grep regexp from m|^t/| to m|^[/\\]| and this seemed to fix the issue. If I get time, I'll dig through some of the other test failures to see if I can identify the underlying causes. If I can get something more substantial than just a single line fix, I'll post a patch, but I may not be able to devote the time to debugging so I thought you'd want me to let you know about this one rather than waiting. Neil Hemingway
RT-Send-CC: neil.hemingway [...] barclays.com
I have an update. Most of the fixes are corrections to regexps to make them cope with Win32 paths (\) as well as UNIX paths (/): Files.pm line 211 The regexp should read |demos?)[\/\\]\w/ line 95 Check regexp. Should it be /[\/\\]/ ?? FindModules.pm line 47 The regexp should read {/^[^\/\\]+\.pm$/ line 82 The regexp should read m|^lib[/\\](.*)\.pm$| line 84 The regexp should read s|[/\\]|::|g line 107 The regexp should read s|^[a-z]+[/\\]|| line 111 The regexp should read s|[/\\]|::|g testfile.t Using a variable containing a path in a regexp doesn't work on Windows without quoting all the \'s in the variable by doubling them: replace like($a->testfile,qr/$td/,"testdir in testfile"); with my $reTd = $td; $reTd =~ s#\\#\\\\#g; # Double the backslashes to prevent them being interpreted as quoting the following character like($a->testfile,qr/$reTd/,"testdir in testfile"); Finally, I still get one test failing, but I can't work out why without some help. t\calc......................NOK 14 # Failed test 'some kwalitee points' # in t\calc.t at line 30. # got: '21' # expected: '22' # $VAR1 = { # 'has_test_pod' => 1, # 'extracts_nicely' => 1, # 'metayml_conforms_spec_1_0' => 0, # 'has_buildtool' => 1, # 'has_tests' => 1, # 'has_readme' => 1, # 'manifest_matches_dist' => 0, # 'has_example' => 1, # 'has_manifest' => 1, # 'has_test_pod_coverage' => 1, # 'no_symlinks' => 1, # 'has_version' => 1, # 'has_working_buildtool' => 1, # 'metayml_conforms_spec_1_2' => 0, # 'buildtool_not_executable' => 1, # 'extractable' => 1, # 'has_humanreadable_license' => 0, # 'metayml_is_parsable' => 1, # 'metayml_has_license' => 0, # 'proper_libs' => 1, # 'has_changelog' => 1, # 'has_meta_yml' => 1, # 'no_pod_errors' => 1, # 'use_strict' => 1, # 'kwalitee' => 21, # 'no_cpants_errors' => 1, # 'is_prereq' => 0, # 'has_proper_version' => 1 # }; What kwalitee points am I missing???? Regards, Neil
Here's the promised diff. I created it with: diff -u %originalFile% %modifiedFile% I hope that's correct. If it's not, let me know what I should have done and I'll do it. On the point of the last failing test (calc.t), do you have a list of where you expect the 22 kwalitee points to come from? With that info, I could do some more digging to determine what I am missing. Regards, Neil
Download Uses.pm.dif
application/octet-stream 362b

Message body not shown because it is not plain text.

Download Files.pm.dif
application/octet-stream 589b

Message body not shown because it is not plain text.

Download testfile.t.dif
application/octet-stream 500b

Message body not shown because it is not plain text.

Download FindModules.pm.dif
application/octet-stream 1.3k

Message body not shown because it is not plain text.

By comparing the test output with that on a linux box, I've identified that the issue is in Manifest.pm. The MANIFEST files lists files like eg/freq.pl whilst the running test gets eg\\freq.pl when running on Windows. Modifying the comparison to use canonpath on each side resolves the issue. The tests now all complete correctly.
Download Manifest.pm.dif
application/octet-stream 629b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #25207] Test failures under MSWin32 for Module::CPANTS::Analyse
Date: Mon, 19 Mar 2007 08:03:49 +0100
To: Neil Hemingway via RT <bug-Module-CPANTS-Analyse [...] rt.cpan.org>
From: Thomas Klausner <domm [...] cpan.org>
Hi! On Sun, Mar 18, 2007 at 06:12:04PM -0400, Neil Hemingway via RT wrote: Show quoted text
> > Queue: Module-CPANTS-Analyse > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=25207 > > > By comparing the test output with that on a linux box, I've identified > that the issue is in Manifest.pm. The MANIFEST files lists files like > eg/freq.pl whilst the running test gets eg\\freq.pl when running on > Windows. Modifying the comparison to use canonpath on each side > resolves the issue. > > The tests now all complete correctly.
I'll look into this issue soonish, thanks for your effort ! -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Subject: Re: [rt.cpan.org #25207] Test failures under MSWin32 for Module::CPANTS::Analyse
Date: Sat, 21 Apr 2007 11:40:38 +0200
To: Neil Hemingway via RT <bug-Module-CPANTS-Analyse [...] rt.cpan.org>
From: Thomas Klausner <domm [...] cpan.org>
Hi! On Sun, Mar 18, 2007 at 06:12:04PM -0400, Neil Hemingway via RT wrote: Show quoted text
> > Queue: Module-CPANTS-Analyse > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=25207 > > > By comparing the test output with that on a linux box, I've identified > that the issue is in Manifest.pm. The MANIFEST files lists files like > eg/freq.pl whilst the running test gets eg\\freq.pl when running on > Windows. Modifying the comparison to use canonpath on each side > resolves the issue. > > The tests now all complete correctly.
I'm currently working on this, and I'm thinking it might be best to convert all paths to something unixy, so I can do simple $file=~m|/lib/*.pm| stuff (without needing [/\\], which might need other path seperators on other OS) Therefore a quick question: What does this return on Win32: perl -MCwd -MFile::Spec::Functions -le 'print canonpath(getcwd())' I'm interested if the path seperators are slashes / or backslashes \ Thanks! -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
From: CHORNY [...] cpan.org
On Apr 21 05:40:59 2007, DOMM wrote: Show quoted text
> What does this return on Win32: > > perl -MCwd -MFile::Spec::Functions -le 'print canonpath(getcwd())'
perl -MCwd -MFile::Spec::Functions -le "print canonpath(getcwd())" C:\Perl -- Alexandr Ciornii, http://chorny.net