Getopt::ArgvFileGetopt::ArgvFile is a Perl module that interpolates script options from files into @ARGV or another array. | |
Download |
Getopt::ArgvFile Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jochen Stenzel
- Publisher web site:
- http://search.cpan.org/~jstenzel/Getopt-ArgvFile-1.11/ArgvFile.pm
Getopt::ArgvFile Tags
Getopt::ArgvFile Description
Getopt::ArgvFile is a Perl module that interpolates script options from files into @ARGV or another array. Getopt::ArgvFile is a Perl module that interpolates script options from files into @ARGV or another array.SYNOPSISOne line invocation - option hints are processed while the module is loaded: # load module and process option file hints in @ARGV use Getopt::ArgvFile default=>1; # load another module to evaluate the options, e.g.: use Getopt::Long; ... # evaluate options, e.g. this common way: GetOptions(%options, 'any'); # this function is defined in Getopt::LongOr suppress option hint processing when the module is loaded, to perform it later on: # load module, do *not* process option file hints use Getopt::ArgvFile justload=>1; # load another module to evaluate the options, e.g.: use Getopt::Long; ... # *now*, solve option file hints Getopt::ArgvFile::argvFile(default=>1); # evaluate options, e.g. this common way: GetOptions(%options, 'any'); # this function is defined in Getopt::LongOr use the traditional two step invocation of module loading with symbol import and explicit option file handling: # Load the module and import the &argvFile symbol # - this will *not* process option hints. # Use *this* syntax to do so, *exactly*. use Getopt::ArgvFile qw(argvFile); # load another module to evaluate the options, e.g.: use Getopt::Long; ... # *now*, solve option file hints argvFile(default=>1); # evaluate options, e.g. this common way: GetOptions(%options, 'any'); # this function is defined in Getopt::LongIf options should be processed into another array, this can be done this way: # prepare target array my @options=('@options1', '@options2', '@options3'); ... # replace file hints by the options stored in the files argvFile(array=>@options);In case you do not like the "@" prefix it is possible to define an option to be used instead: # prepare target array my @options=('-options', 'options1', '-options', 'options2'); ... # replace file hints by the options stored in the files argvFile(fileOption=>'options', array=>@options); Requirements: · Perl
Getopt::ArgvFile Related Software