{
    "mode": "perldoc",
    "parameter": "AppConfig::Args",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/AppConfig%3A%3AArgs/json",
    "generated": "2026-06-12T16:22:59Z",
    "synopsis": "use AppConfig::Args;\nmy $state   = AppConfig::State->new(\\%cfg);\nmy $cfgargs = AppConfig::Args->new($state);\n$cfgargs->parse(\\@args);            # read args",
    "sections": {
        "NAME": {
            "content": "AppConfig::Args - Perl5 module for reading command line arguments.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use AppConfig::Args;\n\nmy $state   = AppConfig::State->new(\\%cfg);\nmy $cfgargs = AppConfig::Args->new($state);\n\n$cfgargs->parse(\\@args);            # read args\n",
            "subsections": []
        },
        "OVERVIEW": {
            "content": "AppConfig::Args is a Perl5 module which reads command line arguments and uses the options\ntherein to update variable values in an AppConfig::State object.\n\nAppConfig::File is distributed as part of the AppConfig bundle.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "USING THE AppConfig::Args MODULE\nTo import and use the AppConfig::Args module the following line should appear in your Perl\nscript:\n\nuse AppConfig::Args;\n\nAppConfig::Args is used automatically if you use the AppConfig module and create an\nAppConfig::Args object through the parse() method.\n\nAppConfig::File is implemented using object-oriented methods. A new AppConfig::Args object is\ncreated and initialised using the new() method. This returns a reference to a new\nAppConfig::File object. A reference to an AppConfig::State object should be passed in as the\nfirst parameter:\n\nmy $state   = AppConfig::State->new();\nmy $cfgargs = AppConfig::Args->new($state);\n\nThis will create and return a reference to a new AppConfig::Args object.\n\nPARSING COMMAND LINE ARGUMENTS\nThe \"parse()\" method is used to read a list of command line arguments and update the STATE\naccordingly. A reference to the list of arguments should be passed in.\n\n$cfgargs->parse(\\@ARGV);\n\nIf the method is called without a reference to an argument list then it will examine and\nmanipulate @ARGV.\n\nIf the PEDANTIC option is turned off in the AppConfig::State object, any parsing errors (invalid\nvariables, unvalidated values, etc) will generate warnings, but not cause the method to return.\nHaving processed all arguments, the method will return 1 if processed without warning or 0 if\none or more warnings were raised. When the PEDANTIC option is turned on, the method generates a\nwarning and immediately returns a value of 0 as soon as it encounters any parsing error.\n\nThe method continues parsing arguments until it detects the first one that does not start with a\nleading dash, '-'. Arguments that constitute values for other options are not examined in this\nway.\n",
            "subsections": []
        },
        "FUTURE DEVELOPMENT": {
            "content": "This module was developed to provide backwards compatibility (to some degree) with the\npreceeding App::Config module. The argument parsing it provides is basic but offers a quick and\nefficient solution for those times when simple option handling is all that is required.\n\nIf you require more flexibility in parsing command line arguments, then you should consider\nusing the AppConfig::Getopt module. This is loaded and used automatically by calling the\nAppConfig getopt() method.\n\nThe AppConfig::Getopt module provides considerably extended functionality over the\nAppConfig::Args module by delegating out the task of argument parsing to Johan Vromans'\nGetopt::Long module. For advanced command-line parsing, this module (either Getopt::Long by\nitself, or in conjunction with AppConfig::Getopt) is highly recommended.\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": []
        },
        "SEE ALSO": {
            "content": "AppConfig, AppConfig::State, AppConfig::Getopt, Getopt::Long\n",
            "subsections": []
        }
    },
    "summary": "AppConfig::Args - Perl5 module for reading command line arguments.",
    "flags": [],
    "examples": [],
    "see_also": []
}