diff options
Diffstat (limited to 'lib/strict.pm')
-rw-r--r-- | lib/strict.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/strict.pm b/lib/strict.pm index d35c6c105c..6f6028cad4 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -53,13 +53,17 @@ name without fully qualifying it. =item C<strict subs> -This disables the poetry optimization, -generating a compile-time error if you -try to use a bareword identifier that's not a subroutine. +This disables the poetry optimization, generating a compile-time error if +you try to use a bareword identifier that's not a subroutine, unless it +appears in curly braces or on the left hand side of the "=>" symbol. + use strict 'subs'; $SIG{PIPE} = Plumber; # blows up - $SIG{"PIPE"} = "Plumber"; # just fine + $SIG{PIPE} = "Plumber"; # just fine: bareword in curlies always ok + $SIG{PIPE} = \&Plumber; # preferred form + + =back |