summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-21 14:20:04 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-21 14:20:04 +0000
commit8d48b1f52eb0f37d1fba87edee63f3edfa4ce9a8 (patch)
tree3ea38e84e74056fac1cc6046a212b8f317558b88 /lib/File
parent0fab864c5c385dce2d3f87afc92636d35d7ccd9e (diff)
downloadperl-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.pm15
-rw-r--r--lib/File/Spec/Unix.pm6
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