Created
April 24, 2017 20:21
-
-
Save dogbert17/f97842d671848b75f01a0995b0409155 to your computer and use it in GitHub Desktop.
nqp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ method usage($name?, :$use-stderr = False) { | |
+ my $print-func := $use-stderr ?? ¬e !! &say; # RT #130760 | |
if $name { | |
- say($name); | |
+ $print-func($name); | |
} | |
my $usage := "This compiler is based on HLL::Compiler.\n\nOptions:\n"; | |
for @!cmdoptions { | |
$usage := $usage ~ " $_\n"; | |
} | |
- nqp::say($usage); | |
+ $print-func($usage); | |
nqp::exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment