Skip Menu |

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 27698
Status: rejected
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: develop [...] traveljury.com
Cc:
AdminCc:

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



Subject: abs2rel fails on Cygwin
Calling File::Spec->abs2rel($0) doesn't prepend the current drive under Cygwin. So it returns /path rather than C:/path I think File::Spec::Cygwin should have its own _cwd sub: sub _cwd { require Cwd; Cwd::getdcwd(); } thanks Clint
Actually, that probably isn't the fix. let me explain the issue. I am trying to get an absolute directory to access my module's test data. I am doing the following: sub get_path { return File::Spec->catdir( ( File::Spec->splitpath( File::Spec->rel2abs($0) ))[ 0, 1 ] , 'data',@_ ); } And, on Cygwin, this is returning a path like: //home/cwill1is/..../Config-Loader-1.02/t/data/empty Rather than: /home/cwill1is/..../Config-Loader-1.02/t/data/empty thanks Clint
Never mind - my error. I was using catdir(splitpath()) rather than catpath(splitpath())