Skip Menu |

This queue is for tickets about the PathTools CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: JDB [...] cpan.org
Cc:
AdminCc:

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



Subject: File::Spec:Win32::catfile('.', 'foo') returns 'foo' instead of '.\foo'
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: http://rt.perl.org/rt3/Public/Bug/Display.html?id=63492 http://rt.cpan.org/Public/Bug/Display.html?id=25430