This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use the base class cwd() method.
[perl5.git] / lib / File / Spec / VMS.pm
index 70eb39b..4000571 100644 (file)
@@ -8,7 +8,6 @@ $VERSION = '1.4';
 
 @ISA = qw(File::Spec::Unix);
 
-use Cwd;
 use File::Basename;
 use VMS::Filespec;
 
@@ -404,8 +403,7 @@ sub abs2rel {
 
     # Figure out the effective $base and clean it up.
     if ( !defined( $base ) || $base eq '' ) {
-        $base = cwd() ;
-        $base = $self->canonpath( $base ) ;
+        $base = $self->canonpath( $self->cwd ) ;
     }
     elsif ( ! $self->file_name_is_absolute( $base ) ) {
         $base = $self->rel2abs( $base ) ;
@@ -464,7 +462,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 = cwd() ;
+            $base = $self->cwd;
         }
         elsif ( ! $self->file_name_is_absolute( $base ) ) {
             $base = $self->rel2abs( $base ) ;
@@ -501,7 +499,8 @@ sub rel2abs {
 
 =head1 SEE ALSO
 
-L<File::Spec>
+See L<File::Spec> and L<File::Spec::Unix>.  This package overrides the
+implementation of these methods, not the semantics.
 
 =cut