in reply to Re^2: Examples of Where "our" is really needed
in thread Examples fo Where "our" is really needed

You don't declare global variables, like you do my variables, or even local variables. You didn't declare them with use vars, and you don't declare them with our. Global variables spring into existence upon being used; they are not dependent upon mere mortals for their existence.

The only thing that our buys you is the ability to refer to a global variable without its package specifier. If you can accomplish what you need to with lexical variables, you should use them. If you need globals, you may use them. If you use globals, you may use our to save typing the fully-qualified name every time you reference them. But that is all it buys you. our did not introduce any new kind of variable (nor did use vars).

You could do it with use vars, but that (as the docs you quoted said) doesn't give you as tight of control over where the global can be referenced as a familiar. It is, according to its own docs, obsolete.


Caution: Contents may have been coded under pressure.