in reply to retrying an action that could fail

You might want to have a look at Sub::Attempts.

Hope this helps, -gjb-