NAME
ARGV::ENV - Parse an environment variable and unshift into @ARGV
VERSION
version 1.00
SYNOPSIS
From one-liners (see perlrun):
perl -MARGV::ENV=VAR1,VAR2,... -E "..." ...
From a script:
use ARG::ENV qw<VAR1 VAR2>;
...
DESCRIPTION
This module searches the first non-empty environment variable with one of the names given at import time, parses it like the Unix shell (using Text::ParseWords::shellwords) and insert the result at the beginning of @ARGV
.
This module is helpful to implement command-line scripts that take some global config as an environnement variable containing command-line flags.
This module is named ARGV::ENV
(and not Argv::Env
or @ARGV::Env
) because the perl built-in global variables @ARGV
and @ENV
are both in upper case.
SEE ALSO
Some other modules that add magic to @ARGV
: ARGV::URL, ARGV::Abs, ARGV::readonly, Encode::Argv.
AUTHOR
Olivier Mengué, mailto:dolmen@cpan.org.
COPYRIGHT & LICENSE
Copyright © 2011 Olivier Mengué.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.