From: Gurusamy Sarathy Date: Mon, 11 Oct 1999 16:55:48 +0000 (+0000) Subject: change#4327 was inefficient X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=abef537ad8d3230927d259211d4c0d673d28d7b7;p=p5sagit%2Fp5-mst-13.2.git change#4327 was inefficient p4raw-link: @4327 on //depot/perl: aeb5d71d10f95df991fb160dc1adaa06bf9515f4 p4raw-id: //depot/perl@4343 --- diff --git a/lib/lib.pm b/lib/lib.pm index ea3ea5e..d35510d 100644 --- a/lib/lib.pm +++ b/lib/lib.pm @@ -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;