The will phaser trait examples show this code:
our $h will enter { .rememberit() } will undo { .forgetit() };
Which is either misunderstood or simply not a real use case. If it's misunderstood, I would say it enters the block with it's assigned a variable. If it's not a real use case, it calls a method on an undefined variable. This is what seems to happen:
our &doing-good will enter {
say( "running" );
if Backtrace.new.grep: { .subname ~~ /bad/ } {
fail("Not authorized to call this");
}
};
This is simply run when the definition is made, that is, when what exactly is entered? The MAIN scope?
This is probably the documentation fault. It's very likely that phaser traits can't really be applied to variables, but above, when it's actually a block, it's not really run; the "phaser" is run when something that's totally independent of the variable definition of value happens, at least in this case. Any idea?