Skip Menu |

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 84358
Status: open
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: bslaabs [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in:
  • 3.26_01
  • 3.27
  • 3.2701
  • 3.28_01
  • 3.28_02
  • 3.28_03
  • 3.29
  • 3.29_01
  • 3.30
  • 3.30_01
  • 3.30_02
  • 3.31
  • 3.31_02
  • 3.31_03
  • 3.32
  • 3.33
  • 3.39_01
  • 3.40
Fixed in: (no value)



Subject: Expensive no-op in File::Spec::OS2 canonpath
I've been porting File::Spec to Perl 6, and I came across this line in the source for File::Spec::OS2: $path =~ s/^([a-z]:)/\l$1/s; That looks like we take the path, and if it starts with a lowercase drive letter, we convert it to lowercase? Huh? Is converting it to uppercase the correct behavior here? Or is that unnecessary for canonpath? Either way, I'd like to know for my port, because I'm not a DOS/OS/2 user. Thanks for all your hard work; it has been invaluable for my own project.
From: shmuel+bitcard.org [...] patriot.net
On Mon Apr 01 23:11:58 2013, labster wrote: Show quoted text
> I've been porting File::Spec to Perl 6, and I came across this line in > the source for File::Spec::OS2: > > $path =~ s/^([a-z]:)/\l$1/s; > > That looks like we take the path, and if it starts with a lowercase > drive letter, we convert it to lowercase? Huh? > > Is converting it to uppercase the correct behavior here? Or is that > unnecessary for canonpath? Either way, I'd like to know for my port, > because I'm not a DOS/OS/2 user. > > Thanks for all your hard work; it has been invaluable for my own > project.
I'm not aware of any OS/2 case dependencies for drive letters. Could it ben the the same code handles a drive and a UNC server name? Note OS/2-related bug report 75319 "Cwd->abs_path and File::Spec->rel2abs produce incorrect results in OS/2"