summaryrefslogtreecommitdiff
path: root/lib/File/Spec/Unix.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-21 14:12:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-21 14:12:29 +0000
commit0fab864c5c385dce2d3f87afc92636d35d7ccd9e (patch)
treeb1a87eafb355d5dee24f1949f2d46eecc48d1e09 /lib/File/Spec/Unix.pm
parentdccec5e607e831ba5c38d0901281ab237afd81eb (diff)
downloadperl-0fab864c5c385dce2d3f87afc92636d35d7ccd9e.tar.gz
Rename the internal cwd() to _cwd() (it's not curdir).
p4raw-id: //depot/perl@20798
Diffstat (limited to 'lib/File/Spec/Unix.pm')
-rw-r--r--lib/File/Spec/Unix.pm19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm
index 703d23a7ee..9fc556f0c4 100644
--- a/lib/File/Spec/Unix.pm
+++ b/lib/File/Spec/Unix.pm
@@ -374,7 +374,7 @@ sub abs2rel {
# Figure out the effective $base and clean it up.
if ( !defined( $base ) || $base eq '' ) {
- $base = $self->cwd();
+ $base = $self->_cwd();
}
elsif ( ! $self->file_name_is_absolute( $base ) ) {
$base = $self->rel2abs( $base ) ;
@@ -418,9 +418,10 @@ Converts a relative path to an absolute path.
$abs_path = File::Spec->rel2abs( $path ) ;
$abs_path = File::Spec->rel2abs( $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>.
+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 $base volume, and ignores the $path volume.
@@ -446,7 +447,7 @@ sub rel2abs {
if ( ! $self->file_name_is_absolute( $path ) ) {
# Figure out the effective $base and clean it up.
if ( !defined( $base ) || $base eq '' ) {
- $base = $self->cwd();
+ $base = $self->_cwd();
}
elsif ( ! $self->file_name_is_absolute( $base ) ) {
$base = $self->rel2abs( $base ) ;
@@ -470,10 +471,10 @@ L<File::Spec>
=cut
-# Internal routine to File::Spec, no point in publicly documenting
-# this interface since it's the standard Cwd interface. Some of the
-# platform-specific File::Spec subclasses use this.
-sub cwd {
+# Internal routine to File::Spec, no point in making this public since
+# it is the standard Cwd interface. Most of the platform-specific
+# File::Spec subclasses use this.
+sub _cwd {
require Cwd;
Cwd::cwd();
}