in reply to Bad Module Code

What you could do is wrap the contents of your sub in an eval block and return with an error code to the caller if eval saw an error, sort of like try/catch.