package Foo; _run( @ARGV ) if ! caller; sub _run { # Do stuff as a program }