http://www.perlmonks.org?node_id=1001321


in reply to Can I from within a module access variables from the calling program?

Q: What if I need dynamic values in a static Log4perl configuration file?

A: log4perl.appender.Logfile.filename = sub { logfile(); };

A: log4perl.appender.Logfile.filename = sub { MyHackySack->logfile(); };

A: log4perl.appender.Logfile.filename = sub { $Hallo::Ween::GLOBULON || 'punkinguts.log' };