in reply to Re^5: Is it ok to mix functional and oo programming in one package?
in thread Is it ok to mix functional and oo programming in one package?

Anything that unambiguously uses a package automatically declares a package, and so does a package Foo statement.

So you could do

package Foo; package main; # or whatever package is the 'current' one
Which is probably the clearest way of doing it, or you can do something like:
$Foo::a=$Foo::a; # using $Foo::a twice will silence the 'used only on +ce' warning
Note that fully specified package variables are exempt from 'strict "vars"' rules. Or you can declare a subroutine:
sub Foo::declare_package_Foo;
The same technique would work for anything else that unambiguously uses the Foo package.