• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Test/H03-May-2022-14866

t/H03-May-2022-7956

xt/H03-May-2022-1210

ChangesH A D14-May-2020983 5832

LICENSEH A D14-May-202018 KiB379292

MANIFESTH A D14-May-2020257 1919

META.jsonH A D14-May-20202.1 KiB8483

META.ymlH A D14-May-20201.2 KiB4746

Makefile.PLH A D14-May-2020764 3526

README.mdH A D14-May-20201.7 KiB6845

cpanfileH A D14-May-2020157 86

minil.tomlH A D14-May-2020121 64

README.md

1# NAME
2
3Test::Requires - Checks to see if the module can be loaded
4
5# SYNOPSIS
6
7    # in your Makefile.PL
8    use inc::Module::Install;
9    test_requires 'Test::Requires';
10
11    # in your test
12    use Test::More tests => 10;
13    use Test::Requires {
14        'HTTP::MobileAttribute' => 0.01, # skip all if HTTP::MobileAttribute doesn't installed
15    };
16    isa_ok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';
17
18    # or
19    use Test::More tests => 10;
20    use Test::Requires qw(
21        HTTP::MobileAttribute
22    );
23    isa_ok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';
24
25    # or
26    use Test::More tests => 10;
27    use Test::Requires;
28    test_requires 'Some::Optional::Test::Required::Modules';
29    isa_ok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';
30
31# DESCRIPTION
32
33Test::Requires checks to see if the module can be loaded.
34
35If this fails rather than failing tests this **skips all tests**.
36
37Test::Requires can also be used to require a minimum version of Perl:
38
39    use Test::Requires "5.010";  # quoting is necessary!!
40
41    # or
42    use Test::Requires "v5.10";
43
44# AUTHOR
45
46Tokuhiro Matsuno <tokuhirom @\*(#RJKLFHFSDLJF gmail.com>
47
48# THANKS TO
49
50    kazuho++ # some tricky stuff
51    miyagawa++ # original code from t/TestPlagger.pm
52    tomyhero++ # reported issue related older test::builder
53    tobyink++ # documented that Test::Requires "5.010" works
54
55# ENVIRONMENT
56
57If the `RELEASE_TESTING` environment variable is true, then instead
58of skipping tests, Test::Requires bails out.
59
60# SEE ALSO
61
62["TestPlagger.pm" in t](https://metacpan.org/pod/t#TestPlagger.pm)
63
64# LICENSE
65
66This library is free software; you can redistribute it and/or modify
67it under the same terms as Perl itself.
68