Buckaroo Buddha recently asked a question about
strict
in the node
looking for Advice on how strict i should really be.
In his code he used the keyword
our, which is now
deprecated. I looked through some reference manuals (not
extensively, please forgive) and could not find any info
on this keyword.
I tried a little code to see
what Perl v5.005_03 had to say:
use strict;
our $stuff = 5;
print "$stuff\n";
and received the following:
Use of reserved word "our" is deprecated ...
Global symbol "$stuff" requires explicit package name ...
The first line is just a warning, to be expected with
the -w option, but the second line is the result of a
syntax error, sort of goes against the definition of
deprecated I would think. But this has to do with
use strict, which doesn't appear to like 'our'.
Can any one tell a little history about the reserved word
'our' and maybe why it is deprecated? Is it similar to Java's
protected modifier?
Much thanks :)