{
    "mode": "perldoc",
    "parameter": "AppConfig::Getopt",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/AppConfig%3A%3AGetopt/json",
    "generated": "2026-06-12T20:01:27Z",
    "synopsis": "use AppConfig::Getopt;\nmy $state  = AppConfig::State->new(\\%cfg);\nmy $getopt = AppConfig::Getopt->new($state);\n$getopt->parse(\\@args);            # read args",
    "sections": {
        "NAME": {
            "content": "AppConfig::Getopt - Perl5 module for processing command line arguments via delegation to\nGetopt::Long.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use AppConfig::Getopt;\n\nmy $state  = AppConfig::State->new(\\%cfg);\nmy $getopt = AppConfig::Getopt->new($state);\n\n$getopt->parse(\\@args);            # read args\n",
            "subsections": []
        },
        "OVERVIEW": {
            "content": "AppConfig::Getopt is a Perl5 module which delegates to Johan Vroman's Getopt::Long module to\nparse command line arguments and update values in an AppConfig::State object accordingly.\n\nAppConfig::Getopt is distributed as part of the AppConfig bundle.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "USING THE AppConfig::Getopt MODULE\nTo import and use the AppConfig::Getopt module the following line should appear in your Perl\nscript:\n\nuse AppConfig::Getopt;\n\nAppConfig::Getopt is used automatically if you use the AppConfig module and create an\nAppConfig::Getopt object through the getopt() method.\n\nAppConfig::Getopt is implemented using object-oriented methods. A new AppConfig::Getopt object\nis created and initialised using the new() method. This returns a reference to a new\nAppConfig::Getopt object. A reference to an AppConfig::State object should be passed in as the\nfirst parameter:\n\nmy $state  = AppConfig::State->new();\nmy $getopt = AppConfig::Getopt->new($state);\n\nThis will create and return a reference to a new AppConfig::Getopt object.\n\nPARSING COMMAND LINE ARGUMENTS\nThe \"parse()\" method is used to read a list of command line arguments and update the state\naccordingly.\n\nThe first (non-list reference) parameters may contain a number of configuration strings to pass\nto Getopt::Long::Configure. A reference to a list of arguments may additionally be passed or\n@ARGV is used by default.\n\n$getopt->parse();                       # uses @ARGV\n$getopt->parse(\\@myargs);\n$getopt->parse(qw(autoabbrev debug));  # uses @ARGV\n$getopt->parse(qw(debug), \\@myargs);\n\nSee Getopt::Long for details of the configuartion options available.\n\nA Getopt::Long specification string is constructed for each variable defined in the\nAppConfig::State. This consists of the name, any aliases and the ARGS value for the variable.\n\nThese specification string are then passed to Getopt::Long, the arguments are parsed and the\nvalues in the AppConfig::State updated.\n\nSee AppConfig for information about using the AppConfig::Getopt module via the getopt() method.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Andy Wardley, <abw@wardley.org>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 1997-2007 Andy Wardley. All Rights Reserved.\n\nCopyright (C) 1997,1998 Canon Research Centre Europe Ltd.\n\nThis module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "ACKNOWLEDGMENTS": {
            "content": "Many thanks are due to Johan Vromans for the Getopt::Long module. He was kind enough to offer\nassistance and access to early releases of his code to enable this module to be written.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "AppConfig, AppConfig::State, AppConfig::Args, Getopt::Long\n",
            "subsections": []
        }
    },
    "summary": "AppConfig::Getopt - Perl5 module for processing command line arguments via delegation to Getopt::Long.",
    "flags": [],
    "examples": [],
    "see_also": []
}