Skip Menu |

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 45972
Status: new
Priority: 0/
Queue: PathTools

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

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

Subject: File::Spec:Win32::catfile('.', 'foo') returns 'foo' instead of '.\foo'
Download (untitled) / with headers
text/plain 722b
This happens because catfile() on Windows always returns a canonical representation of the *result* of the concatenation. On Unix only the file arguments are canonicalized, not the directory. This makes a difference for 'do' and 'require': require './foo'; will work even if '.' is not in @INC (e.g. TAINT mode), but require 'foo'; will not. You can see catfile being used for this purpose in the Scalar-List-Utils test t/p_tainted.t. It just doesn't trigger an error there because the way the test is run there are always other entries in @INC to allow the filename to resolve. See also:

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

Please report any issues with to