# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #125980]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=125980 >


This works fine:

$ perl6 -e 'sub MAIN("foo") { say "called" }' foo
called

And this works fine:

$ perl6 -e 'sub MAIN(:$arg) { say "called" }' --arg
called

But this doesn't.

$ perl6 -e 'sub MAIN("-?") { say "called" }' -?
Usage:
  -e '...' -?

Being able to supply and option like this is desirable (because people
do "-?" sometimes as an argument), but currently not possible (because
the mechanism that makes something like "-a" work requires there to be
a named parameter :$a, but declaring a :$? doesn't seem quite right,
and so "-?" would be the next best thing but there currently isn't a
fallback that detects it).

$ perl6 --version
This is perl6 version 2015.07.1-176-geb6de6d built on MoarVM version
2015.07-68-g3240047

Reply via email to