note
chromatic
<p>That will actually call the methods at the point of definition, not in the loop. I think you meant instead:</p>
<code>$self->addTab( sub { $self->WatchLog() } );</code>
<p>Another option is to provide the name of methods to call:</p>
<code>$self->addTab( 'WatchLog' );</code>
<p>and then call them with:</p>
<code>$self->$code()</code>
<p>That's really late binding and it can be useful.</p>
465001
465033