GetoptLongWrapper - A wrapper for the Getopt::Long module
Version 0.03
A wrapper for the Getopts::Long module.
use MyMainModule; # has the definition for function the_date. In real practice, not a demo, all the support functions for the options ...
use GetoptLongWrapper; my $mmm=MyMainModule->new(); my %OPTS_CONFIG=( 'the_date' => { 'desc' => q^Print today's date.^, 'func' => 'MyModule::the_date()', 'opt_arg_eg' => '', 'opt_arg_type' => '', }, ); $ARGV[0]='--the_date'; my $golw_obj=new GetoptLongWrapper(mmm, \%OPTS_CONFIG); $golw->run_getopt(); my $rc=$golw->execute_opt(); if(ref($rc)) { use Data::Dumper; print Dumper $rc; } else { print $rc, "\n"; }
print_usage_and_die
my $golw = new GetoptLongWrapper($MyObj, $config_href);
The constructor takes two arguments: an object ref and a refenece to an OPTS_CONFIG hash.
Whats his Name, <whn at theglorydays.net>
<whn at theglorydays.net>
Please report any bugs or feature requests to bug-getoptlongwrapper at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=GetoptLongWrapper. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-getoptlongwrapper at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc GetoptLongWrapper
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=GetoptLongWrapper
CPAN Ratings
https://cpanratings.perl.org/d/GetoptLongWrapper
Search CPAN
https://metacpan.org/release/GetoptLongWrapper
This software is Copyright (c) 2023 by Whats his Name.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install GetoptLongWrapper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GetoptLongWrapper
CPAN shell
perl -MCPAN -e shell install GetoptLongWrapper
For more information on module installation, please visit the detailed CPAN module installation guide.