# New Ticket Created by Alex Jakimenko # Please include the string: [perl #126987] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126987 >
Code: enum Animal (Cat, Dog) Result: ===SORRY!=== Cannot invoke this object Well, the error message is not so good, but you can say “who is going to do that anyway?”. Well, consider this: Code: enum Animal (Cat => 25, Dog) Result: ===SORRY!=== Cannot invoke this object Which is just a shorter version of this: Code: enum Animal (Cat => 25, Dog => 26) Result: (no output, OK) In which case you probably want to do this instead: Code: enum Bool «:Cat(25) Dog» Result: (no output, OK, Dog is actually 26) Possible solution: If there is no way to see what is happening then just any better error message than “Cannot invoke this object” (which does not even provide a line number) will do. If there is a way to see that the user actually wanted to use <> or «» then it should suggest that.