cached value !!

2001-07-26 Thread raptor
hi, I have the following problem... a module/object that use a callback func..example : use Blah; my $obj = new Blah(...); ..later on ... my $firstcall = 1; sub checkSomething { if ($firstcall) {$firstcall = 0; return 0} code ... }; $$obj{checkCode} = \checkSomething;

Re: cached value !!

2001-07-26 Thread Nouguier Olivier
raptor wrote: hi, I have the following problem... a module/object that use a callback func..example : use Blah; my $obj = new Blah(...); ..later on ... my $firstcall = 1; sub checkSomething { if ($firstcall) {$firstcall = 0; return 0} code ... }; $$obj{checkCode} =

Re: cached value !!

2001-07-26 Thread raptor
thanx alot I also thought it has to be closure... but didn't done it in the right way... i.e. i was doing this way :) : { my $firstcall = 1; sub checkSomething { if ($firstcall) {$firstcall = 0; return 0} code ... }; } but it has to be anonymous ...:) raptor wrote: hi,