Getopt::Modular

Modular access to Getopt::Long
Download

Getopt::Modular Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Darin McBride
  • Publisher web site:
  • http://search.cpan.org/~dmcbride/

Getopt::Modular Tags


Getopt::Modular Description

Modular access to Getopt::Long The Getopt::Modular module has a few goals. The first is to find a way to allow a bunch of custom modules to specify what options they want to take. This allows you to reuse modules in multiple environments (applications) without having to repeat a bunch of code for handling silly things like the parameters themselves, their defaults, validation, etc. You also don't need to always be aware of what parameters a module may take if it merely grabs them from the global environment.I find I'm reusing modules that should be user-configurable (via the commandline) in multiple applications a lot. By separating this out, I can just say "use Module;" and suddenly my new application takes all the parameters that Module requires (though I can modify this on a case-by- case basis in my application). This allows me to keep the information about a variable in close proximity to its use (i.e., the same file).SYNOPSISPerhaps a little code snippet. use Getopt::Modular; Getopt::Modular->accept_param( foo => { default => 3, spec => '=s', validate => sub { 3 getOpt('foo'); Requirements: · Perl


Getopt::Modular Related Software