Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39853] [BUG] Tcl - pwd returns path with backslashes on Win32

8 views
Skip to first unread message

Ron Blaschke

unread,
Jul 17, 2006, 8:58:12 AM7/17/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Ron Blaschke
# Please include the string: [perl #39853]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39853 >


Test languages/tcl/t/cmd_pwd.t fails on Win32. Tcl's pwd returns the
path with backslashes, most likely because OS.cwd does too, but the test
expects forward slashes, as the result is compared with Perl's Cwd::getcwd.

The "other" Tcl returns forward slashes, too.

C:\Tcl\bin>tclsh
% puts [pwd]
C:/Tcl/bin

I'm not sure if this should be changed in languages/tcl or Parrot's OS.cwd.

Ron

Will Coleda

unread,
Jul 18, 2006, 2:55:14 PM7/18/06
to perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com
Since both tcl and perl seem to like this style (but I'm sure some
languages need truly native representations), I'd propose that the OS
PMC give a way to say which is preferred.

--
Will "Coke" Coleda
wi...@coleda.com


Ron Blaschke

unread,
Jul 18, 2006, 6:14:50 PM7/18/06
to perl6-i...@perl.org
Will Coleda wrote:
> Since both tcl and perl seem to like this style (but I'm sure some
> languages need truly native representations), I'd propose that the OS
> PMC give a way to say which is preferred.

I agree.

As another note, many programs are fine with forward slashes, including
Microsoft's Visual C++ compiler and Windows PowerShell.

Python seems to prefer the native representation, but also fine with
forward slashes.

C:\>python
ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on
Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from os import getcwd, chdir
>>> print getcwd()
C:\
>>> chdir("C:/tmp")
>>> print getcwd()
C:\tmp


Ruby seems to like the forward slashes.

C:\tmp>ruby
require 'Shell'
puts Shell.new.cwd
^Z
C:/tmp


Will this slashing madness ever end?

Ron

0 new messages