Optimise the case where both $path and $base are relative.

diff --exclude=debian -Naur perl-5.8.8.orig/lib/File/Spec/Unix.pm perl-5.8.8/lib/File/Spec/Unix.pm
--- perl-5.8.8.orig/lib/File/Spec/Unix.pm	2005-08-28 03:14:38.000000000 +1000
+++ perl-5.8.8/lib/File/Spec/Unix.pm	2006-07-05 19:19:33.000000000 +1000
@@ -354,25 +354,32 @@
 sub abs2rel {
     my($self,$path,$base) = @_;
 
-    # Clean up $path
-    if ( ! $self->file_name_is_absolute( $path ) ) {
-        $path = $self->rel2abs( $path ) ;
-    }
-    else {
-        $path = $self->canonpath( $path ) ;
-    }
-
     # Figure out the effective $base and clean it up.
     if ( !defined( $base ) || $base eq '' ) {
         $base = $self->_cwd();
     }
     elsif ( ! $self->file_name_is_absolute( $base ) ) {
-        $base = $self->rel2abs( $base ) ;
+	if ( ! $self->file_name_is_absolute( $path ) ) {
+	    # optimisation where both paths are relative: save 2 x cwd
+	    $base = $self->canonpath( "/$base" );
+	    $path = "/$path";
+	}
+	else {
+	    $base = $self->rel2abs( $base ) ;
+	}
     }
     else {
         $base = $self->canonpath( $base ) ;
     }
 
+    # Clean up $path
+    if ( ! $self->file_name_is_absolute( $path ) ) {
+        $path = $self->rel2abs( $path ) ;
+    }
+    else {
+        $path = $self->canonpath( $path ) ;
+    }
+
     # Now, remove all leading components that are the same
     my @pathchunks = $self->splitdir( $path);
     my @basechunks = $self->splitdir( $base);
