> From: Stuart Poulin <stuart@amc.com>
>
> > From: Dick Hardt <Dick_Hardt@hip.com>
> >
> > Hello all,
> >
> > Should pwd (or cwd) return the drive letter if the current drive is an
> > externally mapped drive or the UNC name?
>
> How about a switch? (Something like)
> $Cwd::UNC=1
Nope. That has global effect and so other modules may make conflicting settings.
> How about also a switch to have the paths returned with 'lean to the right' "/"
> slashes instead of 'lean to the left' "\" slashes. Thus making it easier to
> universally break the string apart.
> $Cwd::pathsep="/"
I think one behaviour should be adopted. The OS/2 port translates \ to / with
good effect. I'd strongly recommend it (see below).
> > How many people think that we should supply a pwd.cmd with the distribution?
>
> I vote for a fixed up Cwd.pm for NT. It seems to me the only real way a program
> can know where it's at is to track the chdirs. If I write a perl program on
> Unix I always use the Cwd.pm.
Since:
1. There is such a lot of code written to use `pwd`
(including in the standard library modules)
2. Plus we have have the DOS vs UNC path format issue
3. Plus we have the \ vs / issue
I think the best solution is to:
1. Trap and fake `pwd` internally to return the UNC path with /'s
2. Implement Cwd::getcwd and ::fastcwd for NT as (the faked) `pwd`
That seems to be the best compromise.
Rational:
1. Widespread usage of `pwd` forces either trapping or an external program
2. To consistently get a UNC path with /'s would require special external code
3. Larry is content with `pwd` as a good approach for UNIX
4. A trap&fake is very much faster than running an external program on NT
Comments?
Tim.
>
> > From: Dick Hardt <Dick_Hardt@hip.com>
> >
> > Hello all,
> >
> > Should pwd (or cwd) return the drive letter if the current drive is an
> > externally mapped drive or the UNC name?
>
> How about a switch? (Something like)
> $Cwd::UNC=1
Nope. That has global effect and so other modules may make conflicting settings.
> How about also a switch to have the paths returned with 'lean to the right' "/"
> slashes instead of 'lean to the left' "\" slashes. Thus making it easier to
> universally break the string apart.
> $Cwd::pathsep="/"
I think one behaviour should be adopted. The OS/2 port translates \ to / with
good effect. I'd strongly recommend it (see below).
> > How many people think that we should supply a pwd.cmd with the distribution?
>
> I vote for a fixed up Cwd.pm for NT. It seems to me the only real way a program
> can know where it's at is to track the chdirs. If I write a perl program on
> Unix I always use the Cwd.pm.
Since:
1. There is such a lot of code written to use `pwd`
(including in the standard library modules)
2. Plus we have have the DOS vs UNC path format issue
3. Plus we have the \ vs / issue
I think the best solution is to:
1. Trap and fake `pwd` internally to return the UNC path with /'s
2. Implement Cwd::getcwd and ::fastcwd for NT as (the faked) `pwd`
That seems to be the best compromise.
Rational:
1. Widespread usage of `pwd` forces either trapping or an external program
2. To consistently get a UNC path with /'s would require special external code
3. Larry is content with `pwd` as a good approach for UNIX
4. A trap&fake is very much faster than running an external program on NT
Comments?
Tim.