ARGV::ENV - Parse an environment variable and unshift into @ARGV
version 1.00
From one-liners (see perlrun):
perl -MARGV::ENV=VAR1,VAR2,... -E "..." ...
From a script:
use ARG::ENV qw<VAR1 VAR2>; ...
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.
@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.
ARGV::ENV
Argv::Env
@ARGV::Env
@ENV
Some other modules that add magic to @ARGV: ARGV::URL, ARGV::Abs, ARGV::readonly, Encode::Argv.
Olivier Mengué, mailto:dolmen@cpan.org.
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.
To install ARGV::ENV, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ARGV::ENV
CPAN shell
perl -MCPAN -e shell install ARGV::ENV
For more information on module installation, please visit the detailed CPAN module installation guide.