add option to configure the dataype prefix format (lowercase and/or uppercase)

Hi Micha,

I'd like to ask you to add the option to define more than one letter for a prefix group. Alternativly add the option to use a defined prefix in lower and uppercase letter. Example:

my $B_DEBUG = 0;           # defines a global flag
my $b_is_valid_value = 1;  # defines a conditional variable

-- file: .perlcriticrc --

[Variables::RequireHungarianNotation]
boolean = b_ B_

-- [A1] - example use case --

sub new {
  my $class = shift;
  my $self = {};
  bless $self, $class;
  return $self;
}

execution of current version (0.0.7; 2018) will pass either 'b_' or 'B_' as valid notation for datatype group. Above definition is accepted but only the first defined value is used.

To summarize my request:

  1. please add the option to say that a datatype prefix should be valid in lowercase (default), uppercase or both (for two or more letter prefix [e.g. hashref = hr_ ] the variations of 'Hr_', 'hR_' shoud not be valid)
  2. this option should be configurable for each defined datatype prefix - like:
    • upper_case_only = array regex # as example
    • lower_and_upper_case = boolean
    • lower_case_only = (default: all | all remaining)
  3. the "self" definition may be supplemented by '$class' >> see [A1] as example use case

Thank you and kind regards

Gunter

Edited by Gunter Lang