THRIFT-4691: ensure CPAN module runs unit tests
diff --git a/lib/perl/Makefile.PL b/lib/perl/Makefile.PL
index bdeaad2..5e60ab4 100644
--- a/lib/perl/Makefile.PL
+++ b/lib/perl/Makefile.PL
@@ -33,4 +33,17 @@
                    'Bit::Vector'     => 0,
                    'Class::Accessor' => 0
                },
+#              SIGN => 1,
                VERSION_FROM => 'lib/Thrift.pm' );
+
+# THRIFT-4691
+package MY; # so that "SUPER" works right
+sub test {
+    # Adds gen-perl and gen-perl2 to the test execution as include paths
+    # Could not find anything in MakeMaker that would do this...
+    my @result;
+    for (@result = shift->SUPER::test(@_)) {
+        s/\$\(TEST_FILES\)/-Igen-perl -Igen-perl2 \$(TEST_FILES)/ig;
+    }
+    @result;
+}