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


> bag
===SORRY!===
Argument to "bag" seems to be malformed
------> bag^<EOL>
Other potential difficulties:
    Function "bag" may not be called without arguments (please use () or 
whitespace to denote arguments, or &bag to refer to the function as a noun, or 
use .bag if you meant $_)
    ------> bag^<EOL>
> $_ = 3; .bag
No such method 'bag' for invocant of type 'Int'
  in block <unit> at <unknown file> line 1

The error message given in response to "bag" with no argument list advises
one to use ".bag" to perform this operation on $_.  In fact there is no
widely-available .bag method, so this part of the error message is bogus.
The same problem arises with some subs that generate a different type
of message for the same situation, such as "mkdir".  This part of the
message is correct for some of the other subs that generate these types
of errors, such as "WHAT" and "say".  If it's desired to keep this part
of the message for those subs, then the message will have to vary in
whether it includes this part, according to whether the sub is actually
available as a method.

-zefram

Reply via email to