diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-21 14:20:04 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-21 14:20:04 +0000 |
commit | 8d48b1f52eb0f37d1fba87edee63f3edfa4ce9a8 (patch) | |
tree | 3ea38e84e74056fac1cc6046a212b8f317558b88 /lib/File | |
parent | 0fab864c5c385dce2d3f87afc92636d35d7ccd9e (diff) | |
download | perl-8d48b1f52eb0f37d1fba87edee63f3edfa4ce9a8.tar.gz |
Underline the fact that abs2rel() makes no sense
if it spans multiple roots.
p4raw-id: //depot/perl@20799
Diffstat (limited to 'lib/File')
-rw-r--r-- | lib/File/Spec.pm | 15 | ||||
-rw-r--r-- | lib/File/Spec/Unix.pm | 6 |
2 files changed, 13 insertions, 8 deletions
diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index c43576b5fa..3efda13055 100644 --- a/lib/File/Spec.pm +++ b/lib/File/Spec.pm @@ -220,12 +220,15 @@ from the base path to the destination path: $rel_path = File::Spec->abs2rel( $path ) ; $rel_path = File::Spec->abs2rel( $path, $base ) ; -If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative, -then it is converted to absolute form using L</rel2abs()>. This means that it -is taken to be relative to L<cwd()|Cwd>. - -On systems with the concept of a volume, this assumes that both paths -are on the $destination volume, and ignores the $base volume. +If $base is not present or '', then L<cwd()|Cwd> is used. If $base is +relative, then it is converted to absolute form using +L</rel2abs()>. This means that it is taken to be relative to +L<cwd()|Cwd>. + +On systems with the concept of a volume, this assumes that both paths +are on the $destination volume, and ignores the $base volume. If this +assumption may be wrong (like in VMS), trying to "unify" the paths +abs2rel() results in nonsense. On systems that have a grammar that indicates filenames, this ignores the $base filename as well. Otherwise all path components are assumed to be diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 9fc556f0c4..1309f9d88e 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -343,8 +343,10 @@ relative, then it is converted to absolute form using L</rel2abs()>. This means that it is taken to be relative to L<cwd()|Cwd>. -On systems with the concept of a volume, this assumes that both paths -are on the $destination volume, and ignores the $base volume. +On systems with the concept of a volume, this assumes that both paths +are on the $destination volume, and ignores the $base volume. If this +assumption may be wrong (like in VMS), trying to "unify" the paths with +abs2rel() results in nonsense. On systems that have a grammar that indicates filenames, this ignores the $base filename as well. Otherwise all path components are assumed to be |