Blob Blame History Raw
--- perl-5.8.8/pod/perlrun.pod.-R-switch	2006-01-13 11:29:17.000000000 -0500
+++ perl-5.8.8/pod/perlrun.pod	2006-06-02 00:29:17.000000000 -0400
@@ -11,6 +11,7 @@
 	S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> ] [ B<-f> ]>
 	S<[ B<-C [I<number/list>] >]>
 	S<[ B<-P> ]>
+	S<[ B<-R> ]>
 	S<[ B<-S> ]>
 	S<[ B<-x>[I<dir>] ]>
 	S<[ B<-i>[I<extension>] ]>
@@ -813,6 +814,26 @@
 before being searched for on the PATH.  On Unix platforms, the
 program will be searched for strictly on the PATH.
 
+=item B<-R>
+X<-R>
+
+Disables the Red Hat module compatibility default search path.
+
+By default, the Red Hat perl distribution will prepend to the default
+search path (@INC) the -V:archname subdirectory of each member of 
+the -V:inc_version_list under the perl vendor and site installation 
+directories. 
+i.e. in shell notation:
+ {-V:vendorlib_stem,-V:sitelib_stem}/{-V:inc_version_list}/-V:archname
+where inc_version_list includes every previous perl version shipped 
+by Red Hat, to provide compatibility for binary modules installed under 
+previous perl versions. This can be quite a long list of directories
+to search, which can slow down module loading. You can disable searching
+these previous perl version architecture specific directories by specifying
+the -R switch - then the default search path will be as for the default
+upstream perl release.
+
+
 =item B<-t>
 X<-t>
 
--- perl-5.8.8/proto.h.-R-switch	2006-06-01 19:13:32.000000000 -0400
+++ perl-5.8.8/proto.h	2006-06-01 23:15:04.000000000 -0400
@@ -1620,7 +1620,7 @@
 STATIC void	S_init_ids(pTHX);
 STATIC void	S_init_lexer(pTHX);
 STATIC void	S_init_main_stash(pTHX);
-STATIC void	S_init_perllib(pTHX);
+STATIC void	S_init_perllib(pTHX,bool rhi);
 STATIC void	S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env);
 STATIC void	S_init_predump_symbols(pTHX);
 STATIC void	S_my_exit_jump(pTHX)
--- perl-5.8.8/embed.fnc.-R-switch	2006-06-01 19:13:32.000000000 -0400
+++ perl-5.8.8/embed.fnc	2006-06-01 23:21:25.000000000 -0400
@@ -1080,7 +1080,7 @@
 s	|void	|init_ids
 s	|void	|init_lexer
 s	|void	|init_main_stash
-s	|void	|init_perllib
+s	|void	|init_perllib   |bool redhat_incpush
 s	|void	|init_postdump_symbols|int argc|NN char **argv|NULLOK char **env
 s	|void	|init_predump_symbols
 rs	|void	|my_exit_jump
--- perl-5.8.8/embed.h.-R-switch	2006-06-01 19:13:32.000000000 -0400
+++ perl-5.8.8/embed.h	2006-06-01 23:13:11.000000000 -0400
@@ -3170,7 +3170,7 @@
 #define init_ids()		S_init_ids(aTHX)
 #define init_lexer()		S_init_lexer(aTHX)
 #define init_main_stash()	S_init_main_stash(aTHX)
-#define init_perllib()		S_init_perllib(aTHX)
+#define init_perllib(rhi)		S_init_perllib(aTHX,rhi)
 #define init_postdump_symbols(a,b,c)	S_init_postdump_symbols(aTHX_ a,b,c)
 #define init_predump_symbols()	S_init_predump_symbols(aTHX)
 #define my_exit_jump()		S_my_exit_jump(aTHX)
--- perl-5.8.8/perl.c.-R-switch	2006-06-01 23:08:08.000000000 -0400
+++ perl-5.8.8/perl.c	2006-06-02 00:00:23.000000000 -0400
@@ -1649,6 +1649,7 @@
 #ifdef USE_SITECUSTOMIZE
     bool minus_f = FALSE;
 #endif
+    bool redhat_incpush = TRUE;
 
     PL_fdscript = -1;
     PL_suidscript = -1;
@@ -1770,11 +1771,15 @@
 	    PL_preprocess = TRUE;
 	    s++;
 	    goto reswitch;
+	case 'R':
+	    redhat_incpush = FALSE;
+	    s++;
+	    goto reswitch;	
 	case 'S':
 	    forbid_setid("-S");
 	    dosearch = TRUE;
 	    s++;
-	    goto reswitch;
+	    goto reswitch;	
 	case 'V':
 	    {
 		SV *opts_prog;
@@ -2062,7 +2067,7 @@
 	scriptname = "-";
     }
 
-    init_perllib();
+    init_perllib(redhat_incpush);
 
     open_script(scriptname,dosearch,sv);
 
@@ -4736,7 +4741,7 @@
 }
 
 STATIC void
-S_init_perllib(pTHX)
+S_init_perllib(pTHX, bool redhat_incpush)
 {
     char *s;
     if (!PL_tainting) {
@@ -4803,7 +4808,8 @@
      * DLL-based path intuition to work correctly */
 #  if !defined(WIN32)
     incpush(SITEARCH_EXP, FALSE, FALSE, TRUE);
-    incpush_oldversion(aTHX_ SITEARCH_EXP);
+    if ( redhat_incpush )
+      incpush_oldversion(aTHX_ SITEARCH_EXP);
 #  endif
 #endif
 
@@ -4825,7 +4831,8 @@
      * DLL-based path intuition to work correctly */
 #  if !defined(WIN32)
     incpush(PERL_VENDORARCH_EXP, FALSE, FALSE, TRUE);
-    incpush_oldversion(aTHX_ PERL_VENDORARCH_EXP);
+    if ( redhat_incpush )
+      incpush_oldversion(aTHX_ PERL_VENDORARCH_EXP);
 #  endif
 #endif