package STR; use Class::Std::Fast cache => 1; ## ---------------- ---------------- ---------------- ## package main; use threads; use 5.010; use strict; use warnings; STR->new; # create and immediately throw away. # Now do something completely different with threads: threads->create( sub { sleep 2 && say "thread $_" } ) for 1..4; $_->join for threads->list;