Search results for "module:Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless"
Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless - Write bless {}, $class; instead of just bless {};.
Always use the two-argument form of "bless" because it allows subclasses to inherit your constructor. sub new { my $class = shift; my $self = bless {}; # not ok my $self = bless {}, $class; # ok return $self; }...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC