Devel::Cover recommendations... or maybe not?

Ovid publiustemp-londonpm at yahoo.com
Thu Mar 15 15:00:26 GMT 2007


--- jesse <jesse at fsck.com> wrote:

> > Ignore that comment.  I have a cronjob which rebuilds my coverage
> > reports nightly and all of my colleagues can simply check the
> coverage
> > Web site I have set up (I'm reasonably sure that none of them have,
> > however).
> 
> You should post your cronjob ;) It'd be useful to folks. Even if it's
> a two line shell script.

Missed this email.  Whoops.  Here's the cronjob:

  #!/usr/local/bin/bash

  cd /home/cpoe/work/shared_cp/
  if [ -e cover_db ]; then
      /usr/local/bin/cover -delete
  fi
  mkdir cover_db
  /usr/bin/perl -e 'open my $f, "> cover_db/coverage.html" or die $!;
      print $f "<strong> ", scalar localtime(), 
      ": Rebuilding coverage.  Please be patient.</strong>";'
  HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,'^t/'" \
      /usr/bin/perl /usr/local/bin/prove -lr t/
  /usr/local/bin/cover

There are probably better ways to write this, but I am an awful bash
programmer.  Also, the 'print' in there is to have a placeholder on the
Webpage when it's being rebuilt.

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/


More information about the london.pm mailing list