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

[perl #40722] [TODO] Tcl - implement 'dirname' sub in runtime/builtin/file.pir

5 views
Skip to first unread message

Paul Cochrane

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


Implement the stub routine 'dirname' in languages/tcl/runtime/builtin/file.pir

This ticket is in response to cage task #39704.

Nuno Carvalho via RT

unread,
Feb 13, 2007, 10:43:19 AM2/13/07
to perl6-i...@perl.org
On Wed Nov 08 09:17:21 2006, ptc wrote:
> Implement the stub routine 'dirname' in
> languages/tcl/runtime/builtin/file.pir
>
> This ticket is in response to cage task #39704.

Implemented in revision 16967, this implementation looks more
complicated that what should be in order to cover some edge cases. This
could use some windows OS base testing. Here are some live examples on
linux:

** Tclsh:
% file dirname "."
.
% file dirname "file"
.
% file dirname "file.ext"
.
% file dirname "/path/file.ext"
/path
% file dirname "/path/"
/
% file dirname "///./more/com.pli.ca.ted/path/file.ext"
/./more/com.pli.ca.ted/path

** Parrot's Tcl:
% file dirname "."
.
% file dirname "file"
.
% file dirname "file.ext"
.
% file dirname "/path/file.ext"
/path
% file dirname "/path/"
/
% file dirname "///./more/com.pli.ca.ted/path/file.ext"
/./more/com.pli.ca.ted/path

Please, let me me know if you find any missing case. I wouldn't like to
close this ticket until this is tweaked and testd for Windows.

./smash

0 new messages