in reply to RFC: Test::Copyright
Fails to build: There is not a lot that can be done there as it is adequately captured by the CPAN testing.
Well, actually you could reduce the number of dependencies. This module doesn't need Perl6::Slurp at all, as it is easy to do without.
--- lib/Test/Copyright.pm.org 2011-06-15 11:36:34.179000011 +0200 +++ lib/Test/Copyright.pm 2011-06-15 11:35:08.949000008 +0200 @@ -10,7 +10,6 @@ use Test::More; use CPAN::Meta; use Software::LicenseUtils; use Readonly; -use Perl6::Slurp; use UNIVERSAL::require; use Lingua::EN::NameParse; use Email::Address; @@ -141,6 +140,13 @@ sub _software_licenses_ok { return @licenses; } +sub slurp { + my $filename = shift; + open my $fh, "<", $filename or die "$filename: $!"; + local $/; + return <$fh>; +} + sub _cpan_meta_ok { foreach my $file (@META_FILES) { if (-r $file) {
After that, and installing mod::
All tests successful. Files=9, Tests=12, 0 wallclock secs ( 0.03 usr 0.02 sys + 0.47 cusr + 0.04 csys = 0.56 CPU) Result: PASS
Now let me use that on a module I consider perfect:
$ perl -MTest::Copyright -MTest::More -wle'copyright_ok (); done_testi +ng' not ok 1 - found CPAN::Meta file # Failed test 'found CPAN::Meta file' # at /pro/lib/perl5/site_perl/5.12.2/Test/Copyright.pm line 91. ok 2 # skip No CPAN::Meta object 1..2 # Looks like you failed 1 test of 2. Exit 1 $
Well, of course, there is no META.yml during testing. That is generated in a make dist.
I'm not here to add only negative critiques. I'm very much into any means to increase the quality (kwalitee) of my modules, and I'm also very curious about how others think that can be achieved. So far I have however seen no additional value in this module in the form it is currently presented.
FWIW, I have created a meta-target in most of my Makefile.PL's that does all quality checks I can imagine. Of course that is only run after I have used Module::Release to check the module against all available and supported perl builds (I have over 70).
$ make tgzdist pod-spell-check --aspell ok 1 - CSV_XS.pm ok 2 - sandbox/i-ttt/lib/i/ttt.pm 1..2 ok 1 - CommonMistakes ok 1 - CSV_XS.pm ok 2 - sandbox/i-ttt/lib/i/ttt.pm 1..2 ok 2 - Spell-check with aspell 1..0 # SKIP Ispell not selected ok 3 # skip Ispell not selected 1..3 perl sandbox/genPPPort_h.pl perl sandbox/genMETA.pl -c Check if ChangeLog and README are still valid UTF8 ... Check required and recommended module versions ... Checking generated YAML ... Checking if 5.006 is still OK as minimal version for examples 1..5 ok 1 - examples/speed.pl ok 2 - examples/csv-check ok 3 - examples/parser-xs.pl ok 4 - examples/csv2xls ok 5 - examples/csvdiff rm -rf Text-CSV_XS-0.83 /pro/bin/perl "-MExtUtils::Manifest=manicopy,maniread" \ -e "manicopy(maniread(),'Text-CSV_XS-0.83', 'best');" mkdir Text-CSV_XS-0.83 mkdir Text-CSV_XS-0.83/examples mkdir Text-CSV_XS-0.83/t mkdir Text-CSV_XS-0.83/files META.yml not found at -e line 1 Generating META.yml perl sandbox/genMETA.pl tar cvf Text-CSV_XS-0.83.tar Text-CSV_XS-0.83 Text-CSV_XS-0.83/ : Text-CSV_XS-0.83/Makefile.PL rm -rf Text-CSV_XS-0.83 gzip --best Text-CSV_XS-0.83.tar /pro/bin/perl "-MExtUtils::Manifest=fullcheck" -e fullcheck No such file: META.yml Checked dist Text-CSV_XS-0.83.tgz Kwalitee rating 130.43% (30/23) Ignoring metrics is_prereq, prereq_matches_use, build_prereq_ma +tches_use $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: Test::Copyright
by Tux (Canon) on Jun 15, 2011 at 10:06 UTC |