Skip Menu |

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

Report information
The Basics
Id: 102924
Status: open
Priority: 0/
Queue: Module-CPANTS-Analyse

Owner: Nobody in particular
Requestors: KENTNL [...]

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

Subject: Tests always fail use_strict and has_abstract_in_pod if utf8 appears anywhere in the source files path.

There is a problem where, utf8 doesn't need to be in the dist, merely in the filesystem path the dist is located at when the test is running, and that is sufficient to cause failure.

However, there is one important part to triggering the issue:

Meta.YML must have a provides index.

In the shown code, `prove -lvr xt/releases/kwalitee.t` will pass if the containing folder is ASCII

However, it will fail if the containing folder is UTF8 ( for instance, I was using /tmp/perl/fail_02♭ , which contains U+266d as its last character ).

It appears to be doing some mojibaking in paths somewhere, because `strace` reports as following.

strace -e trace=open,stat perl -Ilib  xt/release/kwalitee.t |& grep tmp | grep ENOENT | grep Example

open("/tmp/perl/fail_02\303\242\302\231\302\255/lib/", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/tmp/perl/fail_02\303\242\302\231\302\255/lib/", 0x82a9c0) = -1 ENOENT (No such file or directory)

All the successful reads used the path

stat("/tmp/perl/fail_02\342\231\255"  ....

See attached image of reversal of those byte sequences.

Subject: sn41.jpg
Download sn41.jpg
image/jpeg 11.7k
Subject: source-dump.txt
Download source-dump.txt
text/plain 776b
# perl -MPath::Tiny -E'my $it = path(q[.])->iterator({ recurse => 1 }); while ( my $file = $it->() ){ next if -d $file; say "__[ $file ]__"; print path($file)->slurp_raw }' __[ META.yml ]__ --- provides: Example: file: lib/ version: '0.001000' __[ lib/ ]__ use 5.006; # our use strict; use warnings; package Example; # ABSTRACT: A Pure Perl reimplementation of B Internals 1; __END__ =pod =encoding UTF-8 =head1 NAME Acme::Flat - A Pure Perl reimplementation of B Internals =cut __[ xt/release/kwalitee.t ]__ # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.11 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(qw( use_strict has_abstract_in_pod )); done_testing;
Cool! I've moved this into the queue for Module-CPANTS-Analyse.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to