In a situation like this, I'd suggest using a closure that holds your object reference.
my $thing = new thing(); my $closure = sub { $thing->stuff_to_do(); }; my $thread = threads->create($closure);
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: How do I used a threaded subroutine inside a perl object
by roboticus
in thread How do I used a threaded subroutine inside a perl object
by adamcpfeiffer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |