in reply to requiring pm modules

When you say 'does not work at all', what do you mean, ie, error messages? At a guess, you could be clobbering functions in MainModule, which is why it's better to use use instead of require.