After some more investigation it turned out to be not so difficult in the MAIN parameter handling case. So, fixed with 546dbd99b18425a42c8 . Tests needed!
> On 18 Nov 2016, at 15:40, Itsuki Toyota (via RT) > <perl6-bugs-follo...@perl.org> wrote: > > # New Ticket Created by Itsuki Toyota > # Please include the string: [perl #130131] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130131 > > > > See the following results: > > $ perl6 script.p6 --country=America > Usage: > script.p6 --country=<Country> > > $ perl6 script.p6 --country=1 > Usage: > script.p6 --country=<Country> > > > script.p6: > ---- > use v6; > > enum Country<China America Brazil>; > > sub MAIN(Country :$country!) { > say $country; > } > ---- > > $ perl6 --version > This is Rakudo version 2016.10-295-g85c7072 built on MoarVM version > 2016.10-71-g9d5c874 > implementing Perl 6.c. > > > I think that if sub MAIN cannot accept enum argument, it should display any > error messages and die. >