The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

Class::Usul::TraitFor::UntaintedGetopts - Untaints @ARGV before Getopts processes it

Synopsis

   use Moo;

   with 'Class::Usul::TraitFor::UntaintedGetopts';

Description

Untaints @ARGV before Getopts processes it. Replaces MooX::Options with an implementation closer to MooseX::Getopt::Dashes

Configuration and Environment

Modifies new_with_options and options_usage

Subroutines/Methods

extra_argv

Returns an array ref containing the remaining command line arguments

new_with_options

Parses the command line options and then calls the constructor

next_argv

Returns the next value from "extra_argv" shifting the value off the list

options_usage

Returns the options usage string

_parse_options

Untaints the values of the @ARGV array before the are parsed by Getopt::Long::Descriptive

unshift_argv

Pushes the supplied argument back onto the extra_argv list

untainted_argv

Returns all of the arguments passed, untainted, before Getopt::Long parses them

Diagnostics

None

Dependencies

Data::Record
Encode
Getopt::Long
Getopt::Long::Descriptive
JSON::MaybeXS
Moo::Role

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <pjfl@cpan.org>

License and Copyright

Copyright (c) 2018 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE