in reply to OUR declaration
I usually use our in preference to use vars because it allows a declaration and assignment in one go:
our $globalvar = 10;
For global variables, I usually use our in preference to my because it doesn't create closures within subs, which can cause problems under mod_perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OUR declaration
by nobull (Friar) on Sep 24, 2006 at 13:03 UTC | |
by perrin (Chancellor) on Sep 25, 2006 at 03:57 UTC | |
by sgifford (Prior) on Sep 25, 2006 at 05:54 UTC | |
by perrin (Chancellor) on Sep 25, 2006 at 15:34 UTC | |
by ikegami (Patriarch) on Sep 25, 2006 at 15:51 UTC | |
|