in reply to require 'package'

If the two package declarations are in the same file, require isn't what you want; the purpose of require is to pull in an outside file. It sounds more like what you want is to put that print into a BEGIN block:
BEGIN { print "how to print this"; }
Does that work for you?

At the same time I'd wonder whether your code setup is really as nice as possible; why do you need this code to be executed at compile-time, and is it possible that your logic could be reworked so that you don't have to put the print out in the open like that? And so on.