I have searched for related topic, but still can't solve the problem...
use threads;
my $person = new Person( 'Name' => "yy");
my $udp_thread = threads->new(\&udp_func);
while(1)
{
$person->working();
}
sub udp_func
{
#Can't call method "setName" on an undefined value:
$person->setName();
}
How can I visit the object $person in the new thread ? Thanks very much!!