From: Jarkko Hietaniemi Date: Thu, 21 Aug 2003 14:20:04 +0000 (+0000) Subject: Underline the fact that abs2rel() makes no sense X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d48b1f52eb0f37d1fba87edee63f3edfa4ce9a8;p=p5sagit%2Fp5-mst-13.2.git Underline the fact that abs2rel() makes no sense if it spans multiple roots. p4raw-id: //depot/perl@20799 --- diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index c43576b..3efda13 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 is used. If $base is relative, -then it is converted to absolute form using L. This means that it -is taken to be relative to L. - -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 is used. If $base is +relative, then it is converted to absolute form using +L. This means that it is taken to be relative to +L. + +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 9fc556f..1309f9d 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. This means that it is taken to be relative to L. -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