perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From auta...@apache.org
Subject svn commit: r419251 - /perl/Apache-SizeLimit/trunk/Makefile.PL
Date Wed, 05 Jul 2006 15:14:23 GMT
Author: autarch
Date: Wed Jul  5 08:14:23 2006
New Revision: 419251

URL: http://svn.apache.org/viewvc?rev=419251&view=rev
Log:
Simplify the Apache::Test-related code down to the least bit of code
that seems to work. There was some cruft in here that seemed to have
been cut'n'paste relics, and some things that looked a bit cargo
cult-ish. Review would be appreciated.

You can test the "no Apache::Test" case by changing
check_for_apache_test() to simply "return 0" at the top of the sub. In
both cases, it seems to work and do the right thing for me.

Modified:
    perl/Apache-SizeLimit/trunk/Makefile.PL

Modified: perl/Apache-SizeLimit/trunk/Makefile.PL
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/Makefile.PL?rev=419251&r1=419250&r2=419251&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/Makefile.PL (original)
+++ perl/Apache-SizeLimit/trunk/Makefile.PL Wed Jul  5 08:14:23 2006
@@ -37,20 +37,18 @@
         1;
     };
 
-    Apache::TestMM->import(qw(test clean));
     Apache::TestMM::filter_args();
-
-    my %args = @Apache::TestMM::Argv;
-
     Apache::TestRunPerl->generate_script();
 
     return 1;
 }
 
-sub MY::postamble {
+package MY;
+
+sub postamble {
     my $self = shift;
 
-    my $string = $self->MM::postamble;
+    my $string = $self->SUPER::postamble;
 
     $string .= <<'EOF';
 tag :
@@ -61,7 +59,7 @@
     return $string;
 }
 
-sub MY::test {
+sub test {
     my $self = shift;
 
     eval { require Test::More } or return <<EOF;
@@ -69,15 +67,15 @@
 \t\@echo sorry, cannot run tests without Test::More
 EOF
 
-    return Apache::TestMM::test(@_) if $HAS_APACHE_TEST;
+    return $self->Apache::TestMM::test(@_) if $HAS_APACHE_TEST;
 
-    return $self->MM::test(@_);
+    return $self->SUPER::test(@_);
 }
 
-sub MY::clean {
+sub clean {
     my $self = shift;
 
-    return Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
+    return $self->Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
 
-    return shift->MM::clean(@_);
+    return $self->SUPER::clean(@_);
 }



Mime
View raw message