Cmd

Cmd

Cmd represents a name or path of a command in the shell.

Bool

method Bool( āŸ¶ Bool)

Cmd returns .exists in Bool context

if Cmd<curl> || Cmd<wget> -> $ua {
    say "$ua is here, it can be our http user agent";
}

exists

method exists( āŸ¶ Bool)

Returns true if the command can be found in the current shell enironment.

 my Bool $have-node = Cmd<node>.exists

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