Skip Menu |

This queue is for tickets about the Devel-MAT CPAN distribution.

Report information
The Basics
Id: 123235
Status: resolved
Priority: 0/
Queue: Devel-MAT

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.26
  • 0.27
  • 0.28
Fixed in: 0.31



Subject: Fails on all MSWin32
E.g. http://www.cpantesters.org/cpan/report/b34bd3e8-6bf3-1014-b48d-20e6bc3e3ea7 # Failed test 'use Devel::MAT::Dumper;' # at t\00use.t line 9. # Tried to use 'Devel::MAT::Dumper'. # Error: 00use.t: No such file or directory at C:\STRAWB~1\cpan\build\Devel-MAT-0.28-ZmnAR5\blib\lib/Devel/MAT/Dumper.pm line 121. # Compilation failed in require at t\00use.t line 9. # BEGIN failed--compilation aborted at t\00use.t line 9. # Looks like you failed 1 test of 16. This appears to be related to abs_path(): Devel/MAT/Dumper.pm line 121: my $dumpfile_name = abs_path( $basename ) . ".pmat"; -- Paul Evans
On Tue Oct 10 09:00:31 2017, PEVANS wrote: Show quoted text
> This appears to be related to abs_path():
Perhaps File::Spec->rel2abs() will work better. In any case it seems to work the same on Linux... -- Paul Evans
Subject: rt123235.patch
=== modified file 'Build.PL' --- Build.PL 2017-10-02 18:32:51 +0000 +++ Build.PL 2017-10-15 17:33:07 +0000 @@ -6,8 +6,8 @@ my $build = Module::Build->new( module_name => 'Devel::MAT', requires => { - 'Cwd' => 0, 'File::ShareDir' => 0, + 'File::Spec' => 0, 'List::Util' => '1.44', # uniq 'List::UtilsBy' => 0, # sort_by 'Module::Pluggable' => 0, === modified file 'lib/Devel/MAT/Dumper.pm' --- lib/Devel/MAT/Dumper.pm 2017-10-14 20:09:15 +0000 +++ lib/Devel/MAT/Dumper.pm 2017-10-15 17:33:07 +0000 @@ -10,8 +10,8 @@ our $VERSION = '0.30'; -use Cwd qw( abs_path ); use File::Basename qw( basename ); +use File::Spec; require XSLoader; XSLoader::load( __PACKAGE__, $VERSION ); @@ -118,7 +118,7 @@ my $basename = basename( $0 ); $basename = "perl$basename" if $basename =~ m/^-e$/i; # RT119164 -my $dumpfile_name = abs_path( $basename ) . ".pmat"; +my $dumpfile_name = File::Spec->rel2abs( "$basename.pmat" ); my $dumpfh; my $next_serial = 0; @@ -181,7 +181,7 @@ }; } elsif( $sym eq "-file" ) { - $dumpfile_name = abs_path( shift ); + $dumpfile_name = File::Spec->rel2abs( shift ); } elsif( $sym eq "-max_string" ) { $MAX_STRING = shift;
0.31 seems to have fixed it. Admittedly 0.31 still fails on some MSWin32 boxes, but for other reasons. -- Paul Evans