Function::Parameters interferes with true
CC: @chocolateboy
I found a strange interaction between Function::Parameters and true.pm.
# Foo.pm
package Foo;
use Function::Parameters;
use true;
fun foo() {}
If I load Foo.pm it's fine. But if I load it in a for loop...
$ perl -I ~/tmp/ -we 'for(0..1) { require Foo }'
Foo.pm did not return a true value at -e line 1.
That is very peculiar. Load order of Function::Parameters vs true does not matter. If I change fun foo to sub foo true.pm works again. If I call foo at the end of Foo.pm it works again, despite returning false.
I guess either Function::Parameters is doing something to the opcodes that true isn't expecting, or true is doing something naughty.
Data points:
- doesn't seem to happen with
require Foo; require Foo; - doesn't seem to happen with DEBUGGING perls
- doesn't seem to happen with
runtime => 1
No longer reproducible with the latest version of true. This is most likely the same issue as https://rt.cpan.org/Ticket/Display.html?id=124745, which was fixed in version 1.0.0 of https://github.com/chocolateboy/true.