Subject: | Replace File'Fetch with File::Fetch |
In Internals.pm and Internals/Fetch.pm variables in the module File::Fetch are set with the Perl 4 package delimeter File'Fetch. Can you replace File'Fetch with File::Fetch?
I think that the comment in Internals/Fetch.pm only applies to perl 5.0. I've tested CPANPLUS successfully under Perl 5.6.2 as well as current Perl versions with the single quote replaced by a double colon.
I've started to play with cperl, which has removed support for the old delimeter. I've patched CPANPLUS locally, but it would be nice to have this change upstream.
Subject: | cpanplus-devel-file-fetch.diff.txt |
diff --git a/lib/CPANPLUS/Internals.pm b/lib/CPANPLUS/Internals.pm
index 202599b..544efb7 100644
--- a/lib/CPANPLUS/Internals.pm
+++ b/lib/CPANPLUS/Internals.pm
@@ -266,9 +266,7 @@ be flushed.
### blow away the methods cache... currently, that's only
### File::Fetch's method fail list
} elsif ( $what eq 'methods' ) {
-
- ### still unbelievably p4 :( ###
- $File'Fetch::METHOD_FAIL = $File'Fetch::METHOD_FAIL = {};
+ $File::Fetch::METHOD_FAIL = $File::Fetch::METHOD_FAIL = {};
### blow away the m::l::c cache, so modules can be (re)loaded
### again if they become available
diff --git a/lib/CPANPLUS/Internals/Fetch.pm b/lib/CPANPLUS/Internals/Fetch.pm
index e92b611..e525227 100644
--- a/lib/CPANPLUS/Internals/Fetch.pm
+++ b/lib/CPANPLUS/Internals/Fetch.pm
@@ -230,20 +230,14 @@ sub _fetch {
my @maybe_bad_host;
HOST: {
- ### F*CKING PIECE OF F*CKING p4 SHIT makes
- ### '$File :: Fetch::SOME_VAR'
- ### into a meta variable and starts substituting the file name...
- ### GRAAAAAAAAAAAAAAAAAAAAAAH!
- ### use ' to combat it!
-
### set up some flags for File::Fetch ###
- local $File'Fetch::BLACKLIST = $conf->_get_fetch('blacklist');
- local $File'Fetch::TIMEOUT = $conf->get_conf('timeout');
- local $File'Fetch::DEBUG = $conf->get_conf('debug');
- local $File'Fetch::FTP_PASSIVE = $conf->get_conf('passive');
- local $File'Fetch::FROM_EMAIL = $conf->get_conf('email');
- local $File'Fetch::PREFER_BIN = $conf->get_conf('prefer_bin');
- local $File'Fetch::WARN = $verbose;
+ local $File::Fetch::BLACKLIST = $conf->_get_fetch('blacklist');
+ local $File::Fetch::TIMEOUT = $conf->get_conf('timeout');
+ local $File::Fetch::DEBUG = $conf->get_conf('debug');
+ local $File::Fetch::FTP_PASSIVE = $conf->get_conf('passive');
+ local $File::Fetch::FROM_EMAIL = $conf->get_conf('email');
+ local $File::Fetch::PREFER_BIN = $conf->get_conf('prefer_bin');
+ local $File::Fetch::WARN = $verbose;
### loop over all hosts we have ###