in reply to package variable does not persist

First, make sure you've got warnings enabled everywhere, it'll help you catch typos and other accidents (see also Use strict and warnings):

$ perl -wMstrict -e '$Module::configvar=0; if($Module::confgivar=1) { print "<$Module::configvar>\n"; }' Found = in conditional, should be == at -e line 1. Name "Module::confgivar" used only once: possible typo at -e line 1. <0>

If that doesn't help, you can trace when the variable gets set, put the following debug code at the top of your program, above use Module; and anything else that may make use of $Module::configvar. It will show you exactly when values are stored in the variable.

BEGIN { package LoggingScalar; require Tie::Scalar; our @ISA = 'Tie::StdScalar'; use Carp 'cluck'; sub STORE { cluck "STORE"; shift->SUPER::STORE(@_) } tie $Module::configvar, 'LoggingScalar'; }