in reply to Seeking defined() for compile time

If you're getting errors about "redefining the logger" then I'd assume that the production environment already has Log4perl installed, and that your call to the init method is in conflict with a prior call. Try :
use Log4perl qw(:nowarn);
(iirc) to hide those warnings, but be aware that any config file you specify may be ignored.
Bill H
perl -e 'print sub { "Hello @{[shift]}!\n" }->("World")'