Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Test::Kwalitee(3)     User Contributed Perl Documentation    Test::Kwalitee(3)

NAME
       Test::Kwalitee -	Test the Kwalitee of a distribution before you release
       it

VERSION
       version 1.28

SYNOPSIS
       In a separate test file:

	 use Test::More;
	 use strict;
	 use warnings;
	 BEGIN {
	     plan skip_all => 'these tests are for release candidate testing'
		 unless	$ENV{RELEASE_TESTING};
	 }

	 use Test::Kwalitee 'kwalitee_ok';
	 kwalitee_ok();
	 done_testing;

DESCRIPTION
       Kwalitee	is an automatically-measurable gauge of	how good your software
       is.  That's very	different from quality,	which a	computer really	can't
       measure in a general sense.  (If	you can, you've	solved a hard problem
       in computer science.)

       In the world of the CPAN, the CPANTS project (CPAN Testing Service;
       also a funny acronym on its own)	measures Kwalitee with several
       metrics.	 If you	plan to	release	a distribution to the CPAN -- or even
       within your own organization -- testing its Kwalitee before creating a
       release can help	you improve your quality as well.

       "Test::Kwalitee"	and a short test file will do this for you
       automatically.

USAGE
       Create a	test file as shown in the synopsis.  Run it.  It will run all
       of the potential	Kwalitee tests on the current distribution, if
       possible.  If any fail, it will report those as regular diagnostics.

       If you ship this	test, it will not run for anyone else, because of the
       "RELEASE_TESTING" guard.	(You can omit this guard if you	move the test
       to xt/release/, which is	not run	automatically by other users.)

FUNCTIONS
   kwalitee_ok
       With no arguments, runs all standard metrics.

       To run only a handful of	tests, pass their name(s) to the "kwalitee_ok"
       function:

	 kwalitee_ok(qw( use_strict has_tests ));

       To disable a test, pass its name	with a leading minus ("-"):

	 kwalitee_ok(qw( -use_strict has_readme	));

BACK-COMPATIBILITY MODE
       Previous	versions of this module	ran tests directly via the "import"
       sub, like so:

	   use Test::Kwalitee;
	   # and that's	it!

       ...but this is problematic if you need to perform some setup first, as
       you would need to do that in a "BEGIN" block, or	manually call
       "import". This is messy!

       However,	this calling path is still available, e.g.:

	 use Test::Kwalitee tests => [ qw( use_strict has_tests	) ];

METRICS
       The list	of each	available metric currently available on	your system
       can be obtained with the	"kwalitee-metrics" command (with descriptions,
       if you pass "--verbose" or "-v",	but as of Module::CPANTS::Analyse
       0.97_03,	the tests include:

       o   has_abstract_in_pod

	   Does	the main module	have a "=head1 NAME" section with a short
	   description of the distribution?

       o   has_buildtool

	   Does	the distribution have a	build tool file?

       o   has_changelog

	   Does	the distribution have a	changelog?

       o   has_humanreadable_license

	   Is there a "LICENSE"	section	in documentation, and/or a LICENSE
	   file	present?

       o   has_license_in_source_file

	   Is there license information	in any of the source files?

       o   has_manifest

	   Does	the distribution have a	MANIFEST?

       o   has_meta_yml

	   Does	the distribution have a	META.yml file?

       o   has_readme

	   Does	the distribution have a	README file?

       o   has_tests

	   Does	the distribution have tests?

       o   manifest_matches_dist

	   Do the MANIFEST and distribution contents match?

       o   meta_json_conforms_to_known_spec

	   Does	META.json conform to the recognised META.json specification?
	   (For	specs see CPAN::Meta::Spec)

       o   meta_json_is_parsable

	   Can the META.json be	parsed?

       o   meta_yml_conforms_to_known_spec

	   Does	META.yml conform to any	recognised META.yml specification?
	   (For	specs see
	   <http://module-build.sourceforge.net/META-spec-current.html>)

       o   meta_yml_is_parsable

	   Can the META.yml be parsed?

       o   no_broken_auto_install

	   Is the distribution using an	old version of Module::Install?
	   Versions of Module::Install prior to	0.89 do	not detect correctly
	   that	"CPAN"/"CPANPLUS" shell	is used.

       o   no_broken_module_install

	   Does	the distribution use an	obsolete version of Module::Install?
	   Versions of Module::Install prior to	0.61 might not work on some
	   systems at all. Additionally	if the Makefile.PL uses	the
	   "auto_install()" feature, you need at least version 0.64. Also,
	   1.04	is known to be broken.

       o   no_symlinks

	   Does	the distribution have no symlinks?

       o   use_strict

	   Does	the distribution files all use strict?

ACKNOWLEDGEMENTS
       With thanks to CPANTS and Thomas	Klausner, as well as test tester Chris
       Dolan.

SEE ALSO
       o   kwalitee-metrics (in	this distribution)

       o   Module::CPANTS::Analyse

       o   App::CPANTS::Lint

       o   Test::Kwalitee::Extra

       o   Dist::Zilla::Plugin::Test::Kwalitee

       o   Dist::Zilla::Plugin::Test::Kwalitee::Extra

       o   Dist::Zilla::App::Command::kwalitee

SUPPORT
       Bugs may	be submitted through the RT bug	tracker
       <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Kwalitee> (or
       bug-Test-Kwalitee@rt.cpan.org <mailto:bug-Test-Kwalitee@rt.cpan.org>).

       There is	also a mailing list available for users	of this	distribution,
       at <http://lists.perl.org/list/perl-qa.html>.

       There is	also an	irc channel available for users	of this	distribution,
       at "#perl" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>.

AUTHORS
       o   chromatic <chromatic@wgz.org>

       o   Karen Etheridge <ether@cpan.org>

CONTRIBUTORS
       o   David Steinbrunner <dsteinbrunner@pobox.com>

       o   Gavin Sherlock <sherlock@cpan.org>

       o   Kenichi Ishigaki <ishigaki@cpan.org>

       o   Nathan Haigh	<nathanhaigh@ukonline.co.uk>

       o   Zoffix Znet <cpan@zoffix.com>

       o   Daniel Perrett <perrettdl@googlemail.com>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2005 by chromatic.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.32.1			  2019-02-02		     Test::Kwalitee(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | USAGE | FUNCTIONS | BACK-COMPATIBILITY MODE | METRICS | ACKNOWLEDGEMENTS | SEE ALSO | SUPPORT | AUTHORS | CONTRIBUTORS | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Test::Kwalitee&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help