Test that a Perl 6 project has a good and proper META file
Clone or download
Latest commit 695e911 Apr 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/Test Up version Apr 30, 2018
t Test the source Aug 30, 2017
.gitignore Add precomp artefacts to gitignore Jan 2, 2016
.travis.yml Don't test an old version May 4, 2017
Changes Up version Apr 30, 2018
LICENCE rename LICENCE as en_GB May 30, 2016
META6.json Up version Apr 30, 2018
README.md Fix version matcher Jul 22, 2017
appveyor.yml Don't test an old version May 4, 2017



Build Status Build status

Test that a Perl 6 project has a good and proper META file.


This is the actual t/030-my-meta.t from this distribution


use v6;
use lib 'lib';

use Test;
use Test::META;

plan 1;

# That's it


However, you may want to make this test conditional, only run by the author (e.g. by checking the AUTHOR_TESTING environment variable). Also, regular users of your module will not need Test::META on their system):

use v6;
use lib 'lib';
use Test;
plan 1;


if AUTHOR { 
    require Test::META <&meta-ok>;
else {
     skip-rest "Skipping author test";


This provides a simple mechanism for module authors to have some confidence that they have a working distribution META description file (as described in S22).

It exports one subroutine meta-ok that runs a single sub-test that checks that:

  • The META file (either META6.json or META.info) exists
  • That the META file can be parsed as valid JSON
  • That the attributes marked as "mandatory" are present
  • That the files mention in the "provides" section are present.

There are mechanisms that are used internally for testing to override the location or name of the META file. These can be seen in the test suite though they are not typically needed.


You can install directly with "zef":

# Remote installation
$ zef install Test::META

# From the source directory
$ zef install .


Suggestions/patches are welcomed via github at:


If you can think of further tests that could be made, please send a patch. Bear in mind that the tests for the structure of the META file and particularly the required fields rely on the implementation of the module META6 and you may want to consider changing that instead.


This is free software.

Please see the LICENCE for the details.

© Jonathan Stowe 2015, 2016, 2017