+use Config;
+
+my $pl = $Config{perl_patchlevel};
+my $desc = $Config{git_describe};
+for ($pl, $desc) {
+ $_ = undef unless defined and length;
+}
+
+my @DEFINES;
+
+print "Checking if this is an official release of perl... ";
+my $is_release = ("$]" < 5.011) ? (defined($pl) || defined($desc) ? 0 : 1)
+ : (defined($desc) ? 0 : 1);
+push @DEFINES, "-DSU_RELEASE=$is_release";
+print $is_release ? "yes\n" : "no\n";
+
+# Threads, Windows and 5.8.x don't seem to be best friends
+if ($^O eq 'MSWin32' && "$]" < 5.009) {
+ push @DEFINES, '-DSU_MULTIPLICITY=0';
+}
+
+@DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
+
+my $dist = 'Scope-Upper';
+
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
+my %PREREQ_PM = (
+ 'Exporter' => 0,
+ 'XSLoader' => 0,
+ 'base' => 0,
+);
+
+my %BUILD_REQUIRES = (