So as soon as I posted that, I thought surely there should be some kind of critic policy, and before checking first type, Perl::Critic::Policy::Warnings::SubroutineRedefinedUndefinedDefined
After checking I find three relevant ones
Perl::Critic::Policy::Variables::RequireInitializationForLocalVars - Use my instead of local, except when you have to.
Perl::Critic::Policy::Variables::ProhibitLocalVars - Write local $foo = $bar; instead of just local $foo;
So my new candidate is
Perl::Critic::Policy::Subroutines::ProhibitSeperatedRedefinition - prohibit that which gets by warnings sub foo { ... } local *foo; *foo = sub { };
Should be fairly trivial to write since Perl::Critic::Policy is xpaths
This train of thought firmly establishes in my mind that this situation isn't warnings territory
In reply to Re^5: UPDATED, mostly solved: separation of define + assignment different from combination? ( Perl::Critic::Policy::Subroutines::ProhibitSeperatedRedefinition)
by Anonymous Monk
in thread UPDATED, mostly solved: separation of define + assignment different from combination?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |