Skip to content
Permalink
Browse files

Point to GENERATE-USAGE instead of USAGE

USAGE is going to be deprecated.  Also unplan to deprecate $*USAGE for
now, although I still think we should have a better way.
  • Loading branch information...
lizmat committed Oct 12, 2018
1 parent 341190e commit 24413b5f2875849a3a4e3db188e07685440102c5
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/core/Main.pm6
@@ -15,16 +15,15 @@ my sub RUN-MAIN(&main, $mainline, :$in-as-argsfiles) {
my &args-to-capture := $provided-a-to-c // &default-args-to-capture;
my %sub-main-opts := %*SUB-MAIN-OPTS // {};

# Set up proxy for old-style usage
# Set up proxy for default generated usage
my $usage-produced;
my $*USAGE := Proxy.new(
FETCH => -> | {
# DEPRECATED MESSAGE HERE
$usage-produced //= default-generate-usage(\())
},
STORE => -> | {
die 'Cannot assign to $*USAGE. Please use `sub USAGE {}` to '
~ 'output custom usage message'
die 'Cannot assign to $*USAGE. Please create a '
~ '`sub GENERATE-USAGE {}` to generate custom usage message'
}
);

0 comments on commit 24413b5

Please sign in to comment.
You can’t perform that action at this time.