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