package Foo; package main; # or whatever package is the 'current' one #### $Foo::a=$Foo::a; # using $Foo::a twice will silence the 'used only once' warning #### sub Foo::declare_package_Foo;