Changed use of die to croak - RT#23113
Check for valid module names