sub doSomething { $status->setItems($_[0]); for (1..$_[0]){ sleep 1; $status->update; ## Will call $status->start() if needed } }