logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TooMuchCode::ProhibitUnnecessaryScalarKeyword - Finds `scalar` in scalar context.

Description

       This policy dictates that the use of `scalar` for in statement like this needs to be removed:

           my $n = scalar @items;

       If the left-hand side of assignment is a single scalar variable, then the assignment is in scalar
       context. There is no need to add "scalar" keyword.

perl v5.36.0                                       2023-10-05              Perl::Critic::...ryScalarKeyword(3pm)

Name

       TooMuchCode::ProhibitUnnecessaryScalarKeyword - Finds `scalar` in scalar context.

See Also