You can only take a reference to a subroutine of some sort in perl5 (perl6 will have more sophisticated binding to allow you to pre-populate certain parameters and pass that code ref around instead of the original routine). So here what I'm doing is creating an anonymous sub that is also a closure - it's closed on $self, retaining the current value of $self at the time of this routine. It then calls the routine we want with the parameters we want - even though the Tk code can't know what $self is to pass it in.
As to your assuming lines - I'm not sure, I'm not a Tk user. ;-)
In reply to Re^3: Tk module subs executes without invocation
by Tanktalus
in thread Tk module subs executes without invocation
by dannoura
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |