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: 48422
Status: open
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: haarg [...] haarg.org
mjgardner [...] cpan.org
Cc:
AdminCc:

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



Subject: Allow flow control method calls in ControlStructures::ProhibitPostfixControls
It would be nice to be able to configure certain method calls as allowed to pass ControlStructures::ProhibitPostfixControls. For example, a ->throw method on an exception class behaves the same for flow control as a die or croak.
On Tue Aug 04 15:08:17 2009, haarg wrote: Show quoted text
> It would be nice to be able to configure certain method calls as allowed > to pass ControlStructures::ProhibitPostfixControls. For example, a > ->throw method on an exception class behaves the same for flow control > as a die or croak.
Good suggestion. We'll add that to the TODO list (patches are welcome too). However, you can already configure the Policy to exempt whatever functions you want, like: throw("something went wrong") if $error; But I understand that isn't always what you need.