diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-23 12:23:48 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-23 12:23:48 +0000 |
commit | 17f410f9a3a4ae9cda502b59b391e6653db436ce (patch) | |
tree | 81919bfb78d3c75ad236c4f41f4ea13fae2c010f /lib/strict.pm | |
parent | eb64745eccc492010733ac012342c6cacc81e103 (diff) | |
download | perl-17f410f9a3a4ae9cda502b59b391e6653db436ce.tar.gz |
s/use vars/our/g modules that aren't independently maintained on CPAN
p4raw-id: //depot/perl@4860
Diffstat (limited to 'lib/strict.pm')
-rw-r--r-- | lib/strict.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/strict.pm b/lib/strict.pm index 99ed01d583..f9d60af154 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -38,8 +38,8 @@ use symbolic references (see L<perlref>). =item C<strict vars> This generates a compile-time error if you access a variable that wasn't -declared via C<use vars>, -localized via C<my()> or wasn't fully qualified. Because this is to avoid +declared via "our" or C<use vars>, +localized via C<my()>, or wasn't fully qualified. Because this is to avoid variable suicide problems and subtle dynamic scoping issues, a merely local() variable isn't good enough. See L<perlfunc/my> and L<perlfunc/local>. @@ -50,7 +50,7 @@ L<perlfunc/local>. local $foo = 9; # blows up package Cinna; - use vars qw/ $bar /; # Declares $bar in current package + our $bar; # Declares $bar in current package $bar = 'HgS'; # ok, global declared via pragma The local() generated a compile-time error because you just touched a global |