[perl #126855] [BUG] .WHAT does not allow spaces around the dot (42 . WHAT)
On Sun, 04 Jun 2017 11:19:57 -0700, c...@zoffix.com wrote: > On Wed, 09 Dec 2015 08:12:00 -0800, alex.jakime...@gmail.com wrote: > > Code: > > say 42 .WHAT > > > > Result: > > ===SORRY!=== > > Method call must either supply a name or have a child node that > > evaluates > > to the name > > > > > > Well, I think that it should work. One practical use is 「^42 .WHAT」. > > > > Some explanation: > > > > well, .WHAT anywhere in a space-y method call chain didn't > > work with > > the original commit either > > so it's at least not a regression > > okay, interesting > > probably 'cause .WHAT doesn't go the normal > > QAST::Op(:op,...) route > > right, it's macro-Y > > which fits the error message, 'cause we apparently build such > > an Op > > but > > don't populate the children correctly, because .WHAT > > isn't a > > method > > that can be called with callmethod > > > > > > Well, if it is not supposed to work, then at least the error message > > should > > be awesome. Right now it doesn't even mention the line number. > > > +1 on fixing this or improving error message. > > In my production code I encountered this bug while trying to test the > term's type object > and I added the space after the method to align stuff: > > is make-temp-path.WHAT === IO::Path, *.not, 'made path is not === > IO::Path'; > is make-temp-dir .WHAT === IO::Path, *.not, 'made dir is not === > IO::Path'; > > The second line crashed. > > The current error doesn't even include a location, so it has the > potential for a tedious bug hunt. Hit on this bug again. Even while knowing you can't put spaces before .WHAT, it took me a couple of minutes trying to find where this error was coming from.
[perl #126855] [BUG] .WHAT does not allow spaces around the dot (42 . WHAT)
On Sun, 04 Jun 2017 11:19:57 -0700, c...@zoffix.com wrote: > On Wed, 09 Dec 2015 08:12:00 -0800, alex.jakime...@gmail.com wrote: > > Code: > > say 42 .WHAT > > > > Result: > > ===SORRY!=== > > Method call must either supply a name or have a child node that > > evaluates > > to the name > > > > > > Well, I think that it should work. One practical use is 「^42 .WHAT」. > > > > Some explanation: > > > > well, .WHAT anywhere in a space-y method call chain didn't > > work with > > the original commit either > > so it's at least not a regression > > okay, interesting > > probably 'cause .WHAT doesn't go the normal > > QAST::Op(:op,...) route > > right, it's macro-Y > > which fits the error message, 'cause we apparently build such > > an Op > > but > > don't populate the children correctly, because .WHAT > > isn't a > > method > > that can be called with callmethod > > > > > > Well, if it is not supposed to work, then at least the error message > > should > > be awesome. Right now it doesn't even mention the line number. > > > +1 on fixing this or improving error message. > > In my production code I encountered this bug while trying to test the > term's type object > and I added the space after the method to align stuff: > > is make-temp-path.WHAT === IO::Path, *.not, 'made path is not === > IO::Path'; > is make-temp-dir .WHAT === IO::Path, *.not, 'made dir is not === > IO::Path'; > > The second line crashed. > > The current error doesn't even include a location, so it has the > potential for a tedious bug hunt. Hit on this bug again. Even while knowing you can't put spaces before .WHAT, it took me a couple of minutes trying to find where this error was coming from.
[perl #126855] [BUG] .WHAT does not allow spaces around the dot (42 . WHAT)
On Wed, 09 Dec 2015 08:12:00 -0800, alex.jakime...@gmail.com wrote: > Code: > say 42 .WHAT > > Result: > ===SORRY!=== > Method call must either supply a name or have a child node that evaluates > to the name > > > Well, I think that it should work. One practical use is 「^42 .WHAT」. > > Some explanation: > > well, .WHAT anywhere in a space-y method call chain didn't work with > the original commit either > so it's at least not a regression > okay, interesting > probably 'cause .WHAT doesn't go the normal > QAST::Op(:op,...) route > right, it's macro-Y > which fits the error message, 'cause we apparently build such an Op > but > don't populate the children correctly, because .WHAT isn't a > method > that can be called with callmethod > > > Well, if it is not supposed to work, then at least the error message should > be awesome. Right now it doesn't even mention the line number. +1 on fixing this or improving error message. In my production code I encountered this bug while trying to test the term's type object and I added the space after the method to align stuff: is make-temp-path.WHAT === IO::Path, *.not, 'made path is not === IO::Path'; is make-temp-dir .WHAT === IO::Path, *.not, 'made dir is not === IO::Path'; The second line crashed. The current error doesn't even include a location, so it has the potential for a tedious bug hunt.
[perl #126855] [BUG] .WHAT does not allow spaces around the dot (42 . WHAT)
On Wed, 09 Dec 2015 08:12:00 -0800, alex.jakime...@gmail.com wrote: > Code: > say 42 .WHAT > > Result: > ===SORRY!=== > Method call must either supply a name or have a child node that evaluates > to the name > > > Well, I think that it should work. One practical use is 「^42 .WHAT」. > > Some explanation: > > well, .WHAT anywhere in a space-y method call chain didn't work with > the original commit either > so it's at least not a regression > okay, interesting > probably 'cause .WHAT doesn't go the normal > QAST::Op(:op,...) route > right, it's macro-Y > which fits the error message, 'cause we apparently build such an Op > but > don't populate the children correctly, because .WHAT isn't a > method > that can be called with callmethod > > > Well, if it is not supposed to work, then at least the error message should > be awesome. Right now it doesn't even mention the line number. +1 on fixing this or improving error message. In my production code I encountered this bug while trying to test the term's type object and I added the space after the method to align stuff: is make-temp-path.WHAT === IO::Path, *.not, 'made path is not === IO::Path'; is make-temp-dir .WHAT === IO::Path, *.not, 'made dir is not === IO::Path'; The second line crashed. The current error doesn't even include a location, so it has the potential for a tedious bug hunt.