{
    "mode": "perldoc",
    "parameter": "App::Prove",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/App%3A%3AProve/json",
    "generated": "2026-06-11T21:58:12Z",
    "synopsis": "use App::Prove;\nmy $app = App::Prove->new;\n$app->processargs(@ARGV);\n$app->run;",
    "sections": {
        "NAME": {
            "content": "App::Prove - Implements the \"prove\" command.\n",
            "subsections": []
        },
        "VERSION": {
            "content": "Version 3.43\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Test::Harness provides a command, \"prove\", which runs a TAP based test suite and prints a\nreport. The \"prove\" command is a minimal wrapper around an instance of this module.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use App::Prove;\n\nmy $app = App::Prove->new;\n$app->processargs(@ARGV);\n$app->run;\n",
            "subsections": []
        },
        "METHODS": {
            "content": "",
            "subsections": [
                {
                    "name": "Class Methods",
                    "content": "\"new\"\nCreate a new \"App::Prove\". Optionally a hash ref of attribute initializers may be passed.\n\n\"stateclass\"\nGetter/setter for the name of the class used for maintaining state. This class should either\nsubclass from \"App::Prove::State\" or provide an identical interface.\n\n\"statemanager\"\nGetter/setter for the instance of the \"stateclass\".\n\n\"addrcfile\"\n$prove->addrcfile('myproj/.proverc');\n\nCalled before \"processargs\" to prepend the contents of an rc file to the options.\n\n\"processargs\"\n$prove->processargs(@args);\n\nProcesses the command-line arguments. Attributes will be set appropriately. Any filenames may be\nfound in the \"argv\" attribute.\n\nDies on invalid arguments.\n\n\"run\"\nPerform whatever actions the command line args specified. The \"prove\" command line tool consists\nof the following code:\n\nuse App::Prove;\n\nmy $app = App::Prove->new;\n$app->processargs(@ARGV);\nexit( $app->run ? 0 : 1 );  # if you need the exit code\n\n\"requireharness\"\nLoad a harness replacement class.\n\n$prove->requireharness($for => $classname);\n\n\"printversion\"\nDisplay the version numbers of the loaded TAP::Harness and the current Perl.\n"
                },
                {
                    "name": "Attributes",
                    "content": "After command line parsing the following attributes reflect the values of the corresponding\ncommand line switches. They may be altered before calling \"run\".\n\n\"archive\"\n\"argv\"\n\"backwards\"\n\"blib\"\n\"color\"\n\"directives\"\n\"dry\"\n\"exec\"\n\"extensions\"\n\"failures\"\n\"comments\"\n\"formatter\"\n\"harness\"\n\"ignoreexit\"\n\"includes\"\n\"jobs\"\n\"lib\"\n\"merge\"\n\"modules\"\n\"parse\"\n\"plugins\"\n\"quiet\"\n\"reallyquiet\"\n\"recurse\"\n\"rules\"\n\"showcount\"\n\"showhelp\"\n\"showman\"\n\"showversion\"\n\"shuffle\"\n\"state\"\n\"stateclass\"\n\"taintfail\"\n\"taintwarn\"\n\"testargs\"\n\"timer\"\n\"verbose\"\n\"warningsfail\"\n\"warningswarn\"\n\"tapversion\"\n\"trap\"\n"
                }
            ]
        },
        "PLUGINS": {
            "content": "\"App::Prove\" provides support for 3rd-party plugins. These are currently loaded at run-time,\n*after* arguments have been parsed (so you can not change the way arguments are processed,\nsorry), typically with the \"-P*plugin*\" switch, eg:\n\nprove -PMyPlugin\n\nThis will search for a module named \"App::Prove::Plugin::MyPlugin\", or failing that, \"MyPlugin\".\nIf the plugin can't be found, \"prove\" will complain & exit.\n\nYou can pass an argument to your plugin by appending an \"=\" after the plugin name, eg\n\"-PMyPlugin=foo\". You can pass multiple arguments using commas:\n\nprove -PMyPlugin=foo,bar,baz\n\nThese are passed in to your plugin's \"load()\" class method (if it has one), along with a\nreference to the \"App::Prove\" object that is invoking your plugin:\n\nsub load {\nmy ($class, $p) = @;\n\nmy @args = @{ $p->{args} };\n# @args will contain ( 'foo', 'bar', 'baz' )\n$p->{appprove}->dosomething;\n...\n}\n\nNote that the user's arguments are also passed to your plugin's \"import()\" function as a list,\neg:\n\nsub import {\nmy ($class, @args) = @;\n# @args will contain ( 'foo', 'bar', 'baz' )\n...\n}\n\nThis is for backwards compatibility, and may be deprecated in the future.\n",
            "subsections": [
                {
                    "name": "Sample Plugin",
                    "content": "Here's a sample plugin, for your reference:\n\npackage App::Prove::Plugin::Foo;\n\n# Sample plugin, try running with:\n# prove -PFoo=bar -r -j3\n# prove -PFoo -Q\n# prove -PFoo=bar,My::Formatter\n\nuse strict;\nuse warnings;\n\nsub load {\nmy ($class, $p) = @;\nmy @args = @{ $p->{args} };\nmy $app  = $p->{appprove};\n\nprint \"loading plugin: $class, args: \", join(', ', @args ), \"\\n\";\n\n# turn on verbosity\n$app->verbose( 1 );\n\n# set the formatter?\n$app->formatter( $args[1] ) if @args > 1;\n\n# print some of App::Prove's state:\nfor my $attr (qw( jobs quiet reallyquiet recurse verbose )) {\nmy $val = $app->$attr;\n$val    = 'undef' unless defined( $val );\nprint \"$attr: $val\\n\";\n}\n\nreturn 1;\n}\n\n1;\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "prove, TAP::Harness\n",
            "subsections": []
        }
    },
    "summary": "App::Prove - Implements the \"prove\" command.",
    "flags": [],
    "examples": [],
    "see_also": []
}