git-svn-id: http://dev.catalyst.perl.org/repos/bast/local-lib/1.000/trunk@3756
bd8105ee-0ff8-0310-8827-fb3f25b6796d
requires 'Module::Build' => '0.28'; # lib -> lib/perl5 change
requires 'CPAN' => '1.80'; # sudo support
+# No, really. See
+# https://rt.cpan.org/Public/Bug/Display.html?id=23735
+# for why CPAN now sets the CPANPLUS env var.
+# trouble is this means we can't auto_install(_now) CPAN itself
+# without this beautiful hack
+
+my $no_cpanplus_env = !exists $ENV{PERL5_CPANPLUS_IS_RUNNING};
+require CPAN;
+delete $ENV{PERL5_CPANPLUS_IS_RUNNING} if $no_cpanplus_env;
+
if ($bootstrapping) {
auto_install_now;
} else {