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;
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} =
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,