in reply to Finishing module early

It's rare to have code at the module level. But if you do, just move it into a sub and call the sub at the top level.

package Foo; ... sub init { ... return unless $arg; ... } init() 1;