3bca8a
From c6f460b4bb60352e40e25efe72acd3c2bd14f216 Mon Sep 17 00:00:00 2001
3bca8a
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
3bca8a
Date: Wed, 28 Jan 2015 13:21:10 +0100
3bca8a
Subject: [PATCH] Replace configuration directory string with a marker
3bca8a
MIME-Version: 1.0
3bca8a
Content-Type: text/plain; charset=UTF-8
3bca8a
Content-Transfer-Encoding: 8bit
3bca8a
3bca8a
This allows to redefine the configuration directory name at build
3bca8a
time.
3bca8a
3bca8a
Signed-off-by: Petr Písař <ppisar@redhat.com>
3bca8a
---
3bca8a
 Makefile.PL              | 10 +++++-----
3bca8a
 README                   | 10 +++++-----
3bca8a
 lib/CPAN.pm              | 10 +++++-----
3bca8a
 lib/CPAN/HandleConfig.pm |  2 +-
3bca8a
 scripts/cpan-mirrors     |  2 +-
3bca8a
 5 files changed, 17 insertions(+), 17 deletions(-)
3bca8a
3bca8a
diff --git a/Makefile.PL b/Makefile.PL
3bca8a
index 2cd2f82..3b826cf 100644
3bca8a
--- a/Makefile.PL
3bca8a
+++ b/Makefile.PL
3bca8a
@@ -339,21 +339,21 @@ record-session :
3bca8a
 	$(PERL) -Ilib -MCPAN -e '$$CPAN::Suppress_readline=$$CPAN::Echo_readline=1;shell' | tee ttt.out
3bca8a
 
3bca8a
 run-with-sqlite :
3bca8a
-	$(PERL) -I$$HOME/.cpan -Ilib -MCPAN::SQLite -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{use_sqlite}++; $$CPAN::Config->{sqlite_dbname}="cpandb-sqlite"; shell'
3bca8a
+	$(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::SQLite -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{use_sqlite}++; $$CPAN::Config->{sqlite_dbname}="cpandb-sqlite"; shell'
3bca8a
 
3bca8a
 testrun_very_offline : rm_mirrored_by run_emu_offline
3bca8a
 
3bca8a
 testrun_emu_offline :
3bca8a
-	$(PERL) -I$$HOME/.cpan -Ilib -MCPAN::MyConfig -MCPAN -e '@CPAN::Defaultsites = qw(file:///dev/null); $$CPAN::Config->{urllist} = []; shell'
3bca8a
+	$(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::MyConfig -MCPAN -e '@CPAN::Defaultsites = qw(file:///dev/null); $$CPAN::Config->{urllist} = []; shell'
3bca8a
 
3bca8a
 rm_mirrored_by :
3bca8a
-	rm -f $$HOME/.cpan/sources/MIRRORED.BY*
3bca8a
+	rm -f $$HOME/.XCPANCONFIGNAMEX/sources/MIRRORED.BY*
3bca8a
 
3bca8a
 testrun_http_only :
3bca8a
-	$(PERL) -I$$HOME/.cpan -Ilib -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{urllist} = [qw(http://www.planet-elektronik.de/CPAN/)]; shell'
3bca8a
+	$(PERL) -I$$HOME/.XCPANCONFIGNAMEX -Ilib -MCPAN::MyConfig -MCPAN -e '$$CPAN::Config->{urllist} = [qw(http://www.planet-elektronik.de/CPAN/)]; shell'
3bca8a
 
3bca8a
 urllist :
3bca8a
-	$(PERL) -Ilib -MCPAN -MCPAN::FirstTime -e 'CPAN::FirstTime::init("$$ENV{HOME}/.cpan/CPAN/MyConfig", args => [qw(urllist)])'
3bca8a
+	$(PERL) -Ilib -MCPAN -MCPAN::FirstTime -e 'CPAN::FirstTime::init("$$ENV{HOME}/.XCPANCONFIGNAMEX/CPAN/MyConfig", args => [qw(urllist)])'
3bca8a
 
3bca8a
 runadmin :
3bca8a
 	$(PERL) -Ilib -MCPAN::Admin -eshell
3bca8a
diff --git a/README b/README
3bca8a
index aaf3101..2618d71 100644
3bca8a
--- a/README
3bca8a
+++ b/README
3bca8a
@@ -269,7 +269,7 @@ DESCRIPTION
3bca8a
       restarting the whole get/make/test/install procedure from scratch.
3bca8a
 
3bca8a
     Lockfile
3bca8a
-      Interactive sessions maintain a lockfile, by default "~/.cpan/.lock".
3bca8a
+      Interactive sessions maintain a lockfile, by default "~/.XCPANCONFIGNAMEX/.lock".
3bca8a
       Batch jobs can run without a lockfile and not disturb each other.
3bca8a
 
3bca8a
       The shell offers to run in *downgraded mode* when another process is
3bca8a
@@ -329,7 +329,7 @@ DESCRIPTION
3bca8a
         "install_tested".
3bca8a
 
3bca8a
   mkmyconfig
3bca8a
-    mkmyconfig() writes your own CPAN::MyConfig file into your "~/.cpan/"
3bca8a
+    mkmyconfig() writes your own CPAN::MyConfig file into your "~/.XCPANCONFIGNAMEX/"
3bca8a
     directory so that you can save your own preferences instead of the
3bca8a
     system-wide ones.
3bca8a
 
3bca8a
@@ -530,7 +530,7 @@ CONFIGURATION
3bca8a
 
3bca8a
     Default values defined in the CPAN/Config.pm file can be overridden in a
3bca8a
     user specific file: CPAN/MyConfig.pm. Such a file is best placed in
3bca8a
-    "$HOME/.cpan/CPAN/MyConfig.pm", because "$HOME/.cpan" is added to the
3bca8a
+    "$HOME/.XCPANCONFIGNAMEX/CPAN/MyConfig.pm", because "$HOME/.XCPANCONFIGNAMEX" is added to the
3bca8a
     search path of the CPAN module before the use() or require() statements.
3bca8a
     The mkmyconfig command writes this file for you.
3bca8a
 
3bca8a
@@ -1996,8 +1996,8 @@ FAQ
3bca8a
 
3bca8a
         You may want to configure something like
3bca8a
 
3bca8a
-          o conf make_arg "| tee -ai /root/.cpan/logs/make.out"
3bca8a
-          o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out"
3bca8a
+          o conf make_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make.out"
3bca8a
+          o conf make_install_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make_install.out"
3bca8a
 
3bca8a
         so that STDOUT is captured in a file for later inspection.
3bca8a
 
3bca8a
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
3bca8a
index 4f02850..2c117b4 100644
3bca8a
--- a/lib/CPAN.pm
3bca8a
+++ b/lib/CPAN.pm
3bca8a
@@ -1736,7 +1736,7 @@ restarting the whole get/make/test/install procedure from scratch.
3bca8a
 
3bca8a
 =item Lockfile
3bca8a
 
3bca8a
-Interactive sessions maintain a lockfile, by default C<~/.cpan/.lock>.
3bca8a
+Interactive sessions maintain a lockfile, by default C<~/.XCPANCONFIGNAMEX/.lock>.
3bca8a
 Batch jobs can run without a lockfile and not disturb each other.
3bca8a
 
3bca8a
 The shell offers to run in I<downgraded mode> when another process is
3bca8a
@@ -1810,7 +1810,7 @@ C<install_tested>.
3bca8a
 
3bca8a
 =head2 mkmyconfig
3bca8a
 
3bca8a
-mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.cpan/>
3bca8a
+mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.XCPANCONFIGNAMEX/>
3bca8a
 directory so that you can save your own preferences instead of the
3bca8a
 system-wide ones.
3bca8a
 
3bca8a
@@ -2025,7 +2025,7 @@ in a file CPAN/Config.pm.
3bca8a
 
3bca8a
 Default values defined in the CPAN/Config.pm file can be
3bca8a
 overridden in a user specific file: CPAN/MyConfig.pm. Such a file is
3bca8a
-best placed in C<$HOME/.cpan/CPAN/MyConfig.pm>, because C<$HOME/.cpan> is
3bca8a
+best placed in C<$HOME/.XCPANCONFIGNAMEX/CPAN/MyConfig.pm>, because C<$HOME/.XCPANCONFIGNAMEX> is
3bca8a
 added to the search path of the CPAN module before the use() or
3bca8a
 require() statements. The mkmyconfig command writes this file for you.
3bca8a
 
3bca8a
@@ -3720,8 +3720,8 @@ there is too much output to keep track of.
3bca8a
 
3bca8a
 You may want to configure something like
3bca8a
 
3bca8a
-  o conf make_arg "| tee -ai /root/.cpan/logs/make.out"
3bca8a
-  o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out"
3bca8a
+  o conf make_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make.out"
3bca8a
+  o conf make_install_arg "| tee -ai /root/.XCPANCONFIGNAMEX/logs/make_install.out"
3bca8a
 
3bca8a
 so that STDOUT is captured in a file for later inspection.
3bca8a
 
3bca8a
diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm
3bca8a
index c72439f..a6b92e8 100644
3bca8a
--- a/lib/CPAN/HandleConfig.pm
3bca8a
+++ b/lib/CPAN/HandleConfig.pm
3bca8a
@@ -538,7 +538,7 @@ sub cpan_home_dir_candidates {
3bca8a
     push @dirs, $ENV{USERPROFILE} if $ENV{USERPROFILE};
3bca8a
 
3bca8a
     $CPAN::Config->{load_module_verbosity} = $old_v;
3bca8a
-    my $dotcpan = $^O eq 'VMS' ? '_cpan' : '.cpan';
3bca8a
+    my $dotcpan = $^O eq 'VMS' ? '_XCPANCONFIGNAMEX' : '.XCPANCONFIGNAMEX';
3bca8a
     @dirs = map { File::Spec->catdir($_, $dotcpan) } grep { defined } @dirs;
3bca8a
     return wantarray ? @dirs : $dirs[0];
3bca8a
 }
3bca8a
diff --git a/scripts/cpan-mirrors b/scripts/cpan-mirrors
3bca8a
index fe0e29c..493c140 100644
3bca8a
--- a/scripts/cpan-mirrors
3bca8a
+++ b/scripts/cpan-mirrors
3bca8a
@@ -143,7 +143,7 @@ to your configuration.
3bca8a
 
3bca8a
 If you don't have a F<MIRRORED.BY> file, this program will download one
3bca8a
 for you. It looks through your existing C<urllist> configuration and
3bca8a
-then default locations. It stores it in C<~/.cpan> (or your configured
3bca8a
+then default locations. It stores it in C<~/.XCPANCONFIGNAMEX> (or your configured
3bca8a
 location to store files).
3bca8a
 
3bca8a
 =head1 TO DO
3bca8a
-- 
3bca8a
2.13.6
3bca8a