Skip Menu |

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

Report information
The Basics
Id: 46540
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Perl-Critic-Itch

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

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: (no value)



Subject: Perl::Critic::Policy::CodeLayout::ProhibitHashBarewords incorrectly marked with PBP theme
Hi Marcelo- First, let me congratulate and thank you for Perl-Critic-Itch. I'm always very happy to see new Policy distributions on CPAN. I noticed that CodeLayout::ProhibitHashBarewords is marked with a 'pbp' theme. However, this Policy doesn't really come from Perl Best Practices. In fact, I think Conway prefers to NOT quote bareword hash keys. The 'pbp' theme is intended for Policies that come directly from the book. So I think you should remove the 'pbp' theme from the Policy. You might also consider adding an 'itch' theme. Most third-party Policy authors will add a custom theme to all their Policies, which makes it easier for a user to switch them all on or off. Also, when you call $self->violation() in your Policy, you can pass a string for the explanation, instead of a reference to an array of PBP page numbers. This let's you provide further explanation of the violation, rather than pointing the user to PBP. All of the non-PBP Policies in Perl-Critic use this feature. Otherwise, this is very nice work! -Jeff
Hello Jeff, Thanks for pointing this out! In fact this policy is not part of PBP. I removed pbp from default_themes and added a new theme called itch. Thanks for the last suggestion also. Instead of the reference, I'm passing now a string with a description of the error. I've updated the module and it will be available soon(on version 0.7). Any suggestion, please let me know! Tks, Marcelo