Re: [patch] a cleaner make clean

2001-09-10 Thread Doug MacEachern
On Mon, 10 Sep 2001, Stas Bekman wrote:

> Index: perl-framework/Makefile.PL

looks good, +1




Re: [patch] a cleaner make clean

2001-09-10 Thread Stas Bekman
> just move that to Apache::TestMM (without the MY::), then:
> use Apache::TestMM qw(test clean);
>
> should work.

Index: perl-framework/Makefile.PL
===
RCS file: /home/cvs/httpd-test/perl-framework/Makefile.PL,v
retrieving revision 1.5
diff -u -r1.5 Makefile.PL
--- perl-framework/Makefile.PL  2001/08/21 05:15:37 1.5
+++ perl-framework/Makefile.PL  2001/09/10 01:49:02
@@ -3,7 +3,7 @@
 use 5.006;

 use lib qw(Apache-Test/lib);
-use Apache::TestMM qw(test);
+use Apache::TestMM qw(test clean);

 use File::Find qw(finddepth);

Index: perl-framework/Apache-Test/lib/Apache/TestMM.pm
===
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.10
diff -u -r1.10 TestMM.pm
--- perl-framework/Apache-Test/lib/Apache/TestMM.pm 2001/08/12 19:22:29 
1.10
+++ perl-framework/Apache-Test/lib/Apache/TestMM.pm 2001/09/10 01:49:02
@@ -21,6 +21,18 @@
 }
 }

+sub add_dep {
+my($string, $targ, $add) = @_;
+$$string =~ s/($targ\s+::)/$1 $add /;
+}
+
+sub clean {
+my $self = shift;
+my $string = $self->MM::clean(@_);
+add_dep(\$string, clean => 'test_clean');
+$string;
+}
+
 sub test {

 my $env = Apache::TestConfig->passenv_makestr();

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/