package MyPackage; use threads; use threads::shared; { use Object::InsideOut qw(:NOT_SHARED); }; package main; use threads; my $o = new MyPackage; threads->create(\&th)->join(); sub th { my $o1 = new MyPackage; }