What #474 did for quasis, we also need to do for macro arguments.
I started to suspect/remember this as I was working on the #116 stuff and really throwing code around. Here's a golfed bit of code showcasing the problem:
$ bin/007 -e='macro sq(x) { quasi { my n = 5; {{{x}}} * {{{x}}} } }; my n = 7; say(sq(n))'
25
We get a hygiene leak there, and get 25 instead of 49, because the n that gets transported into the macro via the argument x isn't being detached.
380 is related; it's talking about putting code back. Here we're talking about pulling code away.
What #474 did for quasis, we also need to do for macro arguments.
I started to suspect/remember this as I was working on the #116 stuff and really throwing code around. Here's a golfed bit of code showcasing the problem:
We get a hygiene leak there, and get
25
instead of49
, because then
that gets transported into the macro via the argumentx
isn't being detached.380 is related; it's talking about putting code back. Here we're talking about pulling code away.