NAME
Test::Module::Used - Test dependency between module and META.yml
SYNOPSIS
#!/usr/bin/perl -w
use strict;
use warnings;
use Test::Module::Used;
my $used = Test::Module::Used->new(
exclude_in_testdir => ['Test::Module::Used', 'My::Module'],
);
$used->ok;
DESCRIPTION
Test dependency between module and META.yml
methods
new
create new instance
all parameters are specified by hash-style, and optional.
in ordinary use.
my $used = Test::Module::Used->new(
exclude_in_testdir => ['Test::Module::Used', 'My::Module'],
);
use exclude_in_testdir. If this parameter is specified. Test::Module::Used ignore modules used in testdir.
all parameter is as follows.(specified values are default)
my $used = Test::Module::Used->new(
test_dir => ['t'], # directory(ies) which contains test scripts.
module_dir => ['lib'], # directory(ies) which contains modules.
meta_file => 'META.yml', # META.yml (contains module requirement information)
perl_version => '5.008', # expected perl version
exclude_in_testdir => [], # ignored module(s) for test even if it is used.
exclude_in_moduledir => [], # ignored module(s) for your module(lib) even if it is used.
);
ok
check used module is ok.
my $used = Test::Module::Used->new(
exclude_in_testdir => ['Test::Module::Used', 'My::Module'],
);
$used->ok;
First, This module reads META.yml and get build_requires and requires. Next, reads module directory (by default lib) and test directory(by default t), and compare required module is really used and used module is really required. If all these requirement information is OK, test will success.
AUTHOR
Takuya Tsuchida <tsucchi@cpan.org<gt>
SEE ALSO
Test::Dependencies has almost same feature.
REPOSITORY
http://github.com/tsucchi/Test-Module-Used
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.