{
    "mode": "perldoc",
    "parameter": "Test::Requires",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Test%3A%3ARequires/json",
    "generated": "2026-06-12T11:56:15Z",
    "synopsis": "# in your Makefile.PL\nuse inc::Module::Install;\ntestrequires 'Test::Requires';\n# in your test\nuse Test::More tests => 10;\nuse Test::Requires {\n'HTTP::MobileAttribute' => 0.01, # skip all if HTTP::MobileAttribute doesn't installed\n};\nisaok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';\n# or\nuse Test::More tests => 10;\nuse Test::Requires qw(\nHTTP::MobileAttribute\n);\nisaok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';\n# or\nuse Test::More tests => 10;\nuse Test::Requires;\ntestrequires 'Some::Optional::Test::Required::Modules';\nisaok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';",
    "sections": {
        "NAME": {
            "content": "Test::Requires - Checks to see if the module can be loaded\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "# in your Makefile.PL\nuse inc::Module::Install;\ntestrequires 'Test::Requires';\n\n# in your test\nuse Test::More tests => 10;\nuse Test::Requires {\n'HTTP::MobileAttribute' => 0.01, # skip all if HTTP::MobileAttribute doesn't installed\n};\nisaok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';\n\n# or\nuse Test::More tests => 10;\nuse Test::Requires qw(\nHTTP::MobileAttribute\n);\nisaok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';\n\n# or\nuse Test::More tests => 10;\nuse Test::Requires;\ntestrequires 'Some::Optional::Test::Required::Modules';\nisaok HTTP::MobileAttribute->new, 'HTTP::MobileAttribute::NonMobile';\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Test::Requires checks to see if the module can be loaded.\n\nIf this fails rather than failing tests this skips all tests.\n\nTest::Requires can also be used to require a minimum version of Perl:\n\nuse Test::Requires \"5.010\";  # quoting is necessary!!\n\n# or\nuse Test::Requires \"v5.10\";\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Tokuhiro Matsuno <tokuhirom @*(#RJKLFHFSDLJF gmail.com>\n",
            "subsections": []
        },
        "THANKS TO": {
            "content": "kazuho++ # some tricky stuff\nmiyagawa++ # original code from t/TestPlagger.pm\ntomyhero++ # reported issue related older test::builder\ntobyink++ # documented that Test::Requires \"5.010\" works\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "If the \"RELEASETESTING\" environment variable is true, then instead of skipping tests,\nTest::Requires bails out.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "\"TestPlagger.pm\" in t\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "This library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "Test::Requires - Checks to see if the module can be loaded",
    "flags": [],
    "examples": [],
    "see_also": []
}