change#4327 was inefficient
Gurusamy Sarathy [Mon, 11 Oct 1999 16:55:48 +0000 (16:55 +0000)]
p4raw-link: @4327 on //depot/perl: aeb5d71d10f95df991fb160dc1adaa06bf9515f4

p4raw-id: //depot/perl@4343

lib/lib.pm

index ea3ea5e..d35510d 100644 (file)
@@ -28,9 +28,11 @@ sub import {
            unshift(@INC, "$_/$archname")    if -d "$_/$archname/auto";
            unshift(@INC, "$_/$archname/$]") if -d "$_/$archname/$]/auto";
        }
-       # remove trailing duplicates
-       @INC = grep { ++$names{$_} == 1 } @INC;
     }
+
+    # remove trailing duplicates
+    @INC = grep { ++$names{$_} == 1 } @INC;
+    return;
 }
 
 
@@ -45,6 +47,7 @@ sub unimport {
 
     # Remove ALL instances of each named directory.
     @INC = grep { !exists $names{$_} } @INC;
+    return;
 }
 
 1;