# man > AppConfig::Args

---
type: CommandReference
command: AppConfig::Args
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference
- `use AppConfig::Args; my $state = AppConfig::State->new(\%cfg); my $cfgargs = AppConfig::Args->new($state); $cfgargs->parse(\@ARGV);` — parse arguments from `@ARGV` into configuration.
- `$cfgargs->parse();` — parse arguments directly from `@ARGV` without an explicit reference.

## Name
AppConfig::Args — Perl module for reading command line arguments.

## Synopsis
perl
use AppConfig::Args;

my $state   = AppConfig::State->new(\%cfg);
my $cfgargs = AppConfig::Args->new($state);

$cfgargs->parse(\@args);            # read args
## Options (Methods)
- `new($state)` — creates a new `AppConfig::Args` object, expecting an `AppConfig::State` instance.
- `parse(\@args)` — reads a list of command-line arguments and updates the state. If called without an argument reference, it processes `@ARGV` directly. Returns `1` on success, `0` if warnings were raised (non‑pedantic mode). With `PEDANTIC` enabled in the state, it returns `0` and stops at the first error.

## Examples
perl
use AppConfig::Args;
use AppConfig::State;

my $config = AppConfig::State->new({ PEDANTIC => 1 });
my $args   = AppConfig::Args->new($config);
$args->parse();                     # reads @ARGV automatically
## See Also
- [AppConfig](https://metacpan.org/pod/AppConfig)
- [AppConfig::State](https://metacpan.org/pod/AppConfig::State)
- [AppConfig::Getopt](https://metacpan.org/pod/AppConfig::Getopt) — more flexible argument parsing via Getopt::Long
- [Getopt::Long](https://metacpan.org/pod/Getopt::Long)