in reply to Re: Re: Absolute pathnames from relative?
in thread Absolute pathnames from relative?
I neglected to mention in my initial writeup that soft links are not the only time this arises -- mount points will do it as well. Mounted disks might be local or remote -- they might even be on different operating systems. Same dynamic, though: system_a:/server_disk/home/hubba could be mounted on system_b:/home/hubba. Typically this depends on the NFS implementation (or whatever the remote disk sharing protocol might be).
rob_au is correct that the abs_path() method of Cwd is the best way to perform this trick using a physical system check. abs_path() itself, last time I checked, is based on File::Spec and the Cwd methods cwd() and pwd() routines. There is an analogous fast_abs_path() that "does the right thing" that you expect, without a physical check. Entirely reliable, however, if you expect to be on a homogenous system.
Matt
|
|---|