CPANTestMistakes

From Perl QA

Jump to: navigation, search

The following is the data section of CPAN::Test::Mistake. CPAN::Test never made it off the ground, but perhaps this bit might be useful to others. It describes the things CPAN::Test will look for in a module and report as a mistake, along with the recommendation it will give to the author.

  by         Was the mistake made by the module author, CPAN or CPAN::Test?
  is_fatal   Will the mistake cause the module to fail?
  name       Name we use to refer to this mistake.
  description     Long description of the mistake, and why it is a mistake,
                  for the author.
  fix        Our recommendation on how to fix the mistake.

The format is Data::Denter's pseudo-YAML format.

This is just off the top of my head, and some of the descriptions and recommendations are rather terse.

<pre> File Not Found => %

   by => CPAN
   is_fatal => 1
   description => Couldn't find your module on CPAN
   fix => Contact modules@perl.org

Naughty Archive => %

   by => Author
   is_fatal => 1
   description => Your archive is trying to do NAUGHTY THINGS!  See Archive::Any for an exact definition of naughty.
   fix => Use make dist instead of rolling your own archvies.

Impolite Archive => %

   by => Author
   is_fatal => 0
   description => Your archive didn't make it's own directory to unpack into.
   fix => Use make dist instead of rolling your own archives.

Bad Archive => %

   by => Author
   is_fatal => 1
   description => Your archive appears to be corrupt.
   fix => Use make dist instead of rolling your own archives.

Fetch Dir Doesn't Exist => %

   by => Internal
   is_fatal => 1
   description => Can't find the directory I'm supposed to download modules into
   fix => Make a directory, dumbass

Can't Fetch Module => %

   by => Internal
   is_fatal => 1
   description => Can't download the module from CPAN
   fix => Contact modules@perl.org maybe?

Couldn't Run Makefile.PL => %

   by => Internal
   is_fatal => 1
   description => There's a Makefile.PL, but I can't run it at all.

No Makefile.PL => %

   by => Author
   is_fatal => 1
   description => Your module has no Makefile.PL.
   fix => Write a Makefile.PL.  Read perlmodtut.

Unknown Mistake => %

   by => Internal
   is_fatal => 1
   description => Tried to declare a mistake of an unknown type.
   fix => Have a look at the source code.

Failed Tests => %

   by => Author
   is_fatal => 1
   description => The module failed a 'make test'.
   fix => Examine the test output and fix your code!

Failed make => %

   by => Author
   is_fatal => 1
   description => The module failed a 'make'.
   fix => Examine the make output and fix your code!

Tests in test.pl => %

   by => Author
   is_fatal => 0
   description => Module's tests are in test.pl instead of t/*.t
   fix => Move your tests into t/foo.t instead of test.pl.  Make sure they have the right output for a real test.  See Test::Tutorial.

No tests => %

   by => Author
   is_fatal => 0
   description => The module has no tests at all!
   fix => Write some tests.  See Test::Tutorial

Failed Install => %

   by => Author
   is_fatal => 1
   description => The module failed a 'make install'.
   fix => Examine the install output and fix it.

No Makefile => %

   by => Author
   is_fatal => 1
   description => There was no Makefile after running 'perl Makefile.PL'
   fix => Examine the Makefile.PL output and fix it

Old Perl => %

   by => Internal
   is_fatal => 1
   description => We tried to install your module with a Perl older than you allow.  Our bad.

</pre>

Personal tools
Mongers