develooper Front page | perl.perl6.compiler | Postings from July 2012

[perl #113954] [BUG] Usage message suggests unquoted way of passing several-word argument which will not work in Rakudo

From:
Carl Mäsak
Date:
July 2, 2012 12:54
Subject:
[perl #113954] [BUG] Usage message suggests unquoted way of passing several-word argument which will not work in Rakudo
Message ID:
rt-3.6.HEAD-28836-1341258890-565.113954-82-0@perl.org
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #113954]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113954 >


$ perl6 -e 'multi MAIN("foo bar") {}' foo bar
Usage:
  -e '...' foo bar
$ perl6 -e 'multi MAIN("foo bar") { say "OH HAI" }' 'foo bar'
OH HAI
$

The usage message is confusing because it suggests exactly the
sequence of arguments that failed and triggered the message.
Shell-quoting the two words makes the invocation succeed. I suggest
the shell-quoting be included in the usage message -- but the exact
nature of the fix doesn't matter that much to me, the most important
thing is that usage message not suggest things that don't work.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About