Test::PAUSE::Permissions - tests module permissions in your distribution
# in your xt/perms.t use Test::PAUSE::Permissions; all_permissions_ok();
This module is to test if modules in your distribution have proper permissions or not. You need to set RELEASE_TESTING to test this.
If your distribution has modules/packages that should not be indexed, you might want to generate META files before you run this test to provide no_index information to Test::PAUSE::Permissions.
no_index
You might also want to prepare .pause file to show who is releasing the distribution (you should have one to release distributions anyway).
.pause
This module exports only one function (yet):
Looks for packages with Parse::LocalDistribution, and tests if you have proper permissions for them by PAUSE::Permissions, which downloads 06perms.txt from CPAN before testing.
06perms.txt
By default, all_permissions_ok looks into .pause file to find who is releasing the distribution.
all_permissions_ok
You can also pass the author as an argument, though this is only useful when you generate this test every time you release a distribution.
use Test::PAUSE::Permissions; # assumes ISHIGAKI is going to release the distribution all_permissions_ok('ISHIGAKI');
all_permissions_ok also looks into META files for <x_authority>, and each .pm file for $AUTHORITY variable, for your information.
$AUTHORITY
You can pass an optional hash reference to all_permissions_ok() to change its behavior.
all_permissions_ok()
all_permissions_ok({strict => 1});
If this is set, all_permissions_ok would fail if the following conditions should be met:
x_authority
In the case above, if the uploader uploads the distribution, permission to the new package is only given to the uploader (and the author specified in x_authority if applicable), and other maintainers will not be able to upload the distribution appropriately until they are given permission to the new package. Strict mode is to prevent such an (accidental) addtion so that everyone in a team can upload without a problem.
all_permissions_ok({dev => 1});
This module ignores modules that won't be indexed (namely those that have a version number with an underscore in it) by default. If you do want to test them, set dev to true.
dev
PAUSE::Permissions, App::PAUSE::CheckPerms
Kenichi Ishigaki, <ishigaki@cpan.org>
Copyright (C) 2014 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Test::PAUSE::Permissions, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::PAUSE::Permissions
CPAN shell
perl -MCPAN -e shell install Test::PAUSE::Permissions
For more information on module installation, please visit the detailed CPAN module installation guide.