Bool

Bool

Bool refers to the Boolean type. They can be used as values but more often represent whether a shell command exited successfully. In Str context a Bool will be '1' if true and "" (they empty string) if false.

say True.WHAT #-> Bool
say False.WHAT #-> Bool
say ("foo" eq "bar").WHAT; #-> Bool
say False; #-> ''
say True;  #-> '1'

ACCEPTS

method ACCEPTS(Str $b āŸ¶ Bool)

Simply returns the value of the invocant regardless of the argument.

Int

method Int( āŸ¶ Int)

In Int context, Bools become a 1 if True or a 0 if False.

gist

method gist( āŸ¶ Str)

.gist returns "True" or "False".

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