MyMod/db.pm use strict; use warnings; package MyMod::db; use MyMod; sub fred { print "hello\n" if (MYMOD_DEFAULT); } 1;