Though in your particular case, the module "pulling information" from the main script about the log file name is silly. Instead the main script should "push information" to the module. For example:
use v5.10;
use strict;
use warnings;
BEGIN {
package Some::Module;
no thanks;
our $LOGFILE;
sub what_is_logfile {
say "logfile is $LOGFILE";
}
};
package main;
use Some::Module;
my $log = 'foo.txt';
$Some::Module::LOGFILE = $log;
Some::Module->what_is_logfile;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'