Rereading the root node, the BEGIN was an example of a complicated way of using the module rather than code within the module. So the following should work fine:
package My::Module; if( ... ) { # This module is useless in this case: return 1; } ... 1;
Another possiblity is:
package My::Module; if( ... ) { require My::Module::Internal; } 1;
- tye
In reply to Re^3: Aborting a module (return 1)
by tye
in thread Aborting a module
by suaveant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |