# New Ticket Created by Ira Byerly # Please include the string: [perl #75706] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75706 >
Hello,
When passing a negated Bool argument to a Perl6 MAIN subroutine (perl6
foo.p6 --/bool) the value passed is not False, but is actually True does
False.
For example:
$ perl6 -e 'sub MAIN (Bool :$bool) {say "\$bool=$bool, ?\$bool=", ?$bool}'
--/bool
$bool=1, ?$bool=0
This can be mind-bending to debug because the string value is 1. Also this
behavior appears to be inconsistent with the spec in S06:
> Common Unix command-line conventions are mapped onto the capture as
follows:
> . . .
> # Negation
> --/name :!name
The attached patch sets negated Bool parameters to False.
Best regards,
Ira Kevin Byerly
quester_ on #perl6
quester on perlmonks
[email protected]
0001-Pass-False-to-MAIN-for-bool-not-True-does-False.patch
Description: Binary data
