I seek some example to meditate upon in which the "our" syntax really helps improve the performance or readability of the code. Pray tell me what those examples might be!
Two (small) advantages for me.
First it allows me to type less and still have clarity. For example I prefer this
our $VERSION = '1.00';
to this
use vars qw( $VERSION ); .... $VERSION = '1.00';
or this
$SomePackage::VERSION = '1.00';
Secondly I like being able to localise access to scary things like globals to just where I need them so I can do things like this:
sub AUTOLOAD { our $AUTOLOAD; .... };
I admit these are small advantages, and some would say too small to drop backward compatability, but I like them and will quite happily continue to use our :-)
In reply to Re: Examples fo Where "our" is really needed
by adrianh
in thread Examples fo Where "our" is really needed
by geekondemand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |