+ unless (defined $args{siteinstall}) {
+ require Config;
+ my %uniq;
+ my @order = grep {($_ eq $Config::Config{sitelibexp}
+ or $_ eq $Config::Config{privlibexp})
+ and not $uniq{$_}++} @INC;
+ if ($] < 5.011 and @order == 2
+ and $order[0] eq $Config::Config{sitelibexp}
+ and $order[1] eq $Config::Config{privlibexp}) {
+
+ print "\n";
+ print "Patched perl, with site_perl before core in \@INC, detected.\n";
+ print "Installing dual-life modules into site_perl so they are not\n";
+ print "later overridden by the distribution's package.\n";
+
+ $args{siteinstall} = 1;
+ } else {
+ $args{siteinstall} = 0;
+ }
+ }
+