Subject: | Variables::RequireInitializationForLocalVars should not apply to $/ |
PBP says that when you use 'local' you should explicitly initialize the
value. Hence the policy Variables::RequireInitializationForLocalVars.
However, PBP (on page 213) explicitly recommends the following idiom:
my $code = do { local $/; <$in> };
In a way this is an inconsistency in PBP. But I think the right way to
resolve the contradiction is to be generous, and make
RequireInitializationForLocalVars tolerate 'local $/'.
(The 'local $/' idiom is also recommended in perlfaq5. So I think it is
reasonable for it to be treated as a best practice and granted an
exemption from the rule that you must always have assignment with 'local'.)