I dont have all the code here but I am almost sure you are absolutely right... Thats why it tolds me in any case undefined or empty reference... I was not aware that I am changing semantic of "anywhere" sub to "define before use" variable with local!
Will try it out but I guess you solved my problem.
I was not aware that I am changing semantic of "anywhere" sub to "define before use" variable with local!
There's nothing magical about the = in local *func = sub { ... }; or my $func = sub { ... };. It's an assignment like any other. You can't fetch the value from a variable before you assign the value to the variable. Or as the case is here, before you even create the variable.