Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20606/lib/Module/Build
Modified Files:
Base.pm
Log Message:
Make sure the cover_db stuff is up to date
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.483
retrieving revision 1.484
diff -u -d -r1.483 -r1.484
--- Base.pm 23 Sep 2005 02:33:56 -0000 1.483
+++ Base.pm 23 Sep 2005 03:35:31 -0000 1.484
@@ -1761,6 +1761,17 @@
}
$self->add_to_cleanup('coverage', 'cover_db');
+ $self->depends_on('code');
+
+ # See whether any of the *.pm files have changed since last time
+ # testcover was run. If so, start over.
+ if (-e 'cover_db') {
+ my $pm_files = $self->rscan_dir(File::Spec->catdir($self->blib, 'lib'), qr{\.pm$} );
+ my $cover_files = $self->rscan_dir('cover_db', sub {-f $_ and not /\.html$/});
+
+ $self->do_system(qw(cover -delete))
+ unless $self->up_to_date($pm_files, $cover_files);
+ }
local $Test::Harness::switches =
local $Test::Harness::Switches =
|