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
=== 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;