GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Perl::Critic::Policy::CodeLayout::ProhibitHashBarewords(3) User Contributed Perl Documentation Perl::Critic::Policy::CodeLayout::ProhibitHashBarewords(3)

Perl::Critic::Policy::CodeLayout::ProhibitHashBarewords

This policy is part of Perl::Critic::Itch.

0.07

This Policy forces (single) quotes on all hash keys barewords.

When specifying constant string hash keys, you should use (single) quotes. E.g., $my_hash{'some_key'}

This is the appropriate choice because it results in consistent formatting and if you forget to use quotes sometimes, you have to remember to add them when your key contains internal hyphens, spaces, or other special characters.

Quoted keys are also more likely to be syntax-highlighted by your editor.

Standard for a Perl::Critic::Policy.

Thanks to
  • Jose Carlos Pereira for pointing me in the right direction!
  • All Perl::Critic::Policy contributors. Their code examples were quite useful.
2009-05-30 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.