Subject: | RequireLocalizedPunctuationVars should not want to localize in top-level scope |
Variables::RequireLocalizedPunctuationVars embodies page 81 of PBP, which
suggests using 'local' on a punctuation variable before changing it, so
that the change has as small a scope as possible.
This is normally sound advice, but it does not make sense to 'local' at
the top-level scope of the program. In short scripts you often might set
$ENV{PATH} or other environment variables at the top-level scope. Since
the top-level scope is never exited, the previous value of the variable
will never be restored, and so adding 'local' to the assignment statement
has no effect.
The rule should have an exception for the top-level scope.