in reply to It's a Module. It's a program. Can it be?

Yes, you can.

package MyPackage; $is_require = (caller(0))[7]; if($is_require) { print "I'm a module!\n"; } else { print "I'm a program!\n"; }

caller rocks.

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.