Return-Path: Delivered-To: apmail-perl-modperl-cvs-archive@www.apache.org Received: (qmail 33012 invoked from network); 6 Jul 2006 05:57:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jul 2006 05:57:10 -0000 Received: (qmail 59835 invoked by uid 500); 6 Jul 2006 05:57:10 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 59828 invoked by uid 500); 6 Jul 2006 05:57:10 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@perl.apache.org List-Id: Delivered-To: mailing list modperl-cvs@perl.apache.org Delivered-To: moderator for modperl-cvs@perl.apache.org Received: (qmail 57993 invoked by uid 99); 5 Jul 2006 15:14:44 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r419251 - /perl/Apache-SizeLimit/trunk/Makefile.PL Date: Wed, 05 Jul 2006 15:14:23 -0000 To: modperl-cvs@perl.apache.org From: autarch@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060705151424.224561A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 <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(@_); }