I suspect that fixing this problem will incur a performance penalty. There are three workarounds: 1) Perform the aliasing sooner (e.g. at compile-time). 2) Use symbolic references instead to access the variables (forcing run-time name resolution). 3) Delay the compilation of the variable access (e.g. by using eval). ----- BEGIN CODE ----- $foo::bar::poit::var = "fbp"; $g::var = "g"; BEGIN { $h::var = "h"; } *g:: = \%foo::bar::poit::; # Alias g:: to some long thing. BEGIN { *h:: = \%foo::bar::poit::; # Alias h:: to some long thing. } # 1) Do aliasing sooner print "$foo::bar::poit::var\n"; # Prints fbp print "$g::var\n"; # Prints g print "$h::var\n"; # Prints fbp # 2) Lookup variable later. { no strict 'refs'; print "${'foo::bar::poit::var'}\n"; # Prints fbp print "${'g::var'}\n"; # Prints fbp print "${'h::var'}\n"; # Prints fbp } # 3) Compile variable access later eval ' print "$foo::bar::poit::var\n"; # Prints fbp print "$g::var\n"; # Prints fbp print "$h::var\n"; # Prints fbp '; ----- END CODE -----Thread Previous | Thread Next