in reply to the "return" in a module

AFAIK the placement of the return 1; (or just 1;) in the module file makes no difference.

Michael

Replies are listed 'Best First'.
Re (tilly) 2: the "return" in a module
by tilly (Archbishop) on Mar 09, 2002 at 03:09 UTC
    Actually it can make a difference in two ways.

    The first is that if you put a return before some code that you want executed, it won't be because you returned.

    The second is that if you just use a true value but don't return, and accidentally put some executable code after it (eg a variable initialization) with a false value, then your module will fail to load.

    Both should be obvious if you are bitten by them. But I like putting the true return value at the end anyways.

      That makes sense - thanks.

      Michael