Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 50080
Status: new
Priority: 0/
Queue: Perl-Critic

Owner: Nobody in particular
Requestors: justincase [...]

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)

Subject: new policy suggestion- prohibit unspecified context for called subroutines in lists
Download (untitled) / with headers
text/plain 525b
The proposed policy would prohibit examples like this: my %hash = (key1 => some_function(), key2 => 3); where some_function is defined as: sub some_function { return } Since some_function() is called in list context in the definition of %hash, this results in an odd number of arguments to the hash constructor. this is almost always unintentional. As it is good practice to not explicitly return undef, it should be good practice to explicitly define the context of the called function when it is called in a list.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to