instead of C<"\x7F">, etc." />

Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters - Write C<"\N{DELETE}"> instead of C<"\x7F">, etc.


Perl-Critic documentation  | view source Contained in the Perl-Critic distribution.

Index


NAME

Top

Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters - Write "\N{DELETE}" instead of "\x7F", etc.

AFFILIATION

Top

This Policy is part of the core Perl::Critic distribution.

DESCRIPTION

Top

Escaped numeric values are hard to read and debug. Instead, use named values. The syntax is less compact, but dramatically more readable.

    $str = "\x7F\x06\x22Z";                         # not ok

    use charnames ':full';
    $str = "\N{DELETE}\N{ACKNOWLEDGE}\N{CANCEL}Z";  # ok




CONFIGURATION

Top

This Policy is not configurable except for the standard options.

AUTHOR

Top

Chris Dolan <cdolan@cpan.org>

COPYRIGHT

Top


Perl-Critic documentation  | view source Contained in the Perl-Critic distribution.