allow-no

provide %*SUB-MAIN-OPTS <allow-no> for older Rakudos

NAME

allow-no - provide %*SUB-MAIN-OPTS for older Rakudos

SYNOPSIS

use allow-no;

sub MAIN(:$foo, :$bar) {
    # calling script with --foo, --no-bar
    say $foo;  # True
    say $bar;  # False
}

DESCRIPTION

The allow-no module provides functionality that has been provided by Rakudo 2022.08 and higher: it allows command line parameters to indicate a False flag to be specified as --no-foo as well as the standard allowed --/foo or --foo-False.

Using this module will run an INIT block that will perform the necessary transformation on @*ARGS. No further action or configuration is needed.

AUTHOR

Elizabeth Mattijsen [email protected]

Source can be located at: https://github.com/lizmat/allow-no . Comments and Pull Requests are welcome.

If you like this module, or what Iā€™m doing more generally, committing to a small sponsorship would mean a great deal to me!

COPYRIGHT AND LICENSE

Copyright 2022 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

allow-no v0.0.1

provide %*SUB-MAIN-OPTS <allow-no> for older Rakudos

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • allow-no

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.