I have part of a build process that creates a hideously long paths in Windows. It\'s not my fault. It\'s several directories deep, and none of the directory names are abnorm
This should really be a comment but posting code in comments is hardly useful.
UNC paths do not work either:
C:\> net share perlbuild e:\home\src
#!/usr/bin/perl
use strict;
use warnings;
use File::Path qw(make_path);
use File::Slurp;
use Path::Class;
my $top = dir('//Computer/perlbuild');
my @comps = ('0123456789') x 30;
my $path = dir($top, @comps);
make_path $path, { verbose => 1 };
my $file = file($path, 'test.txt');
write_file "$file" => 'This is a test';
print read_file "$file";
Result:
mkdir \\Computer\perlbuild\0123456789\0123456789\0123456789\0123456789\0123456 789\0123456789\0123456789\0123456789\0123456789\0123456789\0123456789\0123456789 \0123456789\0123456789\0123456789\0123456789\0123456789\0123456789\0123456789\01 23456789\0123456789: No such file or directory; The filename or extension is too long at C:\Temp\k.pl line 15