How has support for Perl::Critic changed across recent Perl versions?

Support for Perl::Critic has been enhanced across recent Perl versions, promoting better coding practices and maintaining more robust code quality. The tool focuses on enforcing coding standards and offers a wide variety of policies to ensure that Perl code is well-structured and maintainable.
Perl::Critic, coding standards, Perl versions, code quality, best practices

# Example of a Perl::Critic policy application

use Perl::Critic;

my $code = 'sub foo { print "Hello World\n"; }';

my $critic = Perl::Critic->new();
my @violations = $critic->critique($code);

foreach my $violation (@violations) {
    print $violation->message(), "\n";
}
    

Perl::Critic coding standards Perl versions code quality best practices