NAME

GetoptLongWrapper - A wrapper for the Getopt::Long module

VERSION

Version 0.01

SYNOPSIS

A wrapper for the Getopts::Long module.

use MyMainModule; # has all the support functions for the options ... use GetoptLongWrapper; my $gow_obj = GetoptLongWrapper->new($obj, \%OPTS_CONFIG); $gow_obj->run_getopt $gow_obj->execute_opt();

EXPORT

print_usage_and_die

METHODS

new
my $obj = new GetoptLongWrapper($obj, $config_href);

The constructor takes two arguments: an object ref and a refenece to an OPT_CONFIG hash.

init_getopts Called by the constructor. Initializes usage, opts_array ...etc, for the GetOption call.

mk_get_opt_array Makes the array of valid options to pass to GetOption.

add_desc Makes the description part of the usage message.

run_getopt Calls the GetOptions function to populate the %opts hash.

execute_opt If %opts is not empty, executes the function associated with that option (passed from the command line).

AUTHOR

Nazar Gabriel, <ngabriel@cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc GetoptLongWrapper

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2023 by Nazar Gabriel.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)