The following module was proposed for inclusion in the Module List:
modid: Getopt::CommandLineExports
DSLIP: bdpfp
description: export command lines for subs in a script
userid: RHAXTON (Robert Haxton)
chapterid: 12 (Opt_Arg_Param_Proc)
communities:
similar:
Bash::Completion::plugins::autocomplete Getopt::Long
rationale:
This module is just a minor extension of Getopt::Long (which it
requires), but also links Getopt::Long's command line spec with bash
auto completion to allow a script to have multiple subcommands that
produce context sensitive auto completion.
So a script might define sub1 that takes one arg (--hostname) that
autocompletes with hostnames and another sub2 that takes a --dir
that autocompletes with directories. The completion also tries to be
sensitive enough to know when an argument expects some value (and
defaults to filename auto completion) and when the argument needs no
value and autocompletion returns to listing available arguments.
It also allows subroutines to be called internally with command
line syntax either as a single scalar or a list of arg names and
values. This is useful for unit testing with external tools that
generate command line tests.
enteredby: RHAXTON (Robert Haxton)
enteredon: Thu Oct 13 09:10:45 2011 GMT
The resulting entry would be:
Getopt::
::CommandLineExports bdpfp export command lines for subs in a script RHAXTON
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=2e600000_11d49b4d6798219d&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=2e600000_11d49b4d6798219d&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Getopt%3A%3ACommandLineExports