Why not just default to "${lib_path}/${lib_REAL}" and  ${mod}_module instead of undef?