Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Maybe to let you do what you want?

    # Emulate $Params::Check::STRIP_LEADING_DASHES $Params::Check::NORMALISE_KEY = sub { s/^-// }; # Combine $Params::Check::STRIP_LEADING_DASHES # and to lowercase $Params::Check::NORMALISE_KEY = sub { lc ; s/^-// }; # Example how to add it to the Params::Check source if ( ref $NORMALISE_KEY eq 'CODE' ){ $key = $NORMALISE_KEY->( $key ); } else { croak "$Params::Check::NORMALISE_KEY must be a coderef"; }

    You get the idea ...

    Clayton

    --

    -- tex

    • <p>Poorly formatted code...</p>

      # Emulate $Params::Check::STRIP_LEADING_DASHES

      $Params::Check::NORMALISE_KEY = sub { s/^-// };

      # Combine $Params::Check::STRIP_LEADING_DASHES
      # and to lowercase

      $Params::Check::NORMALISE_KEY = sub { lc ; s/^-// };

      # Example of how to add it to the Params::Check source

      if ( ref $NORMALISE_KEY eq 'CODE' ){
         $key = $NORMALISE_KEY->( $key );
      } else {
         croak "$Params::Check::NORMALISE_KEY must be a coderef";
      }

      Clayton
      --

      -- tex