summaryrefslogtreecommitdiff
path: root/lib/strict.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strict.pm')
-rw-r--r--lib/strict.pm6
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