Hi,

Variable/Parameter conventions can start religious wars, so I would like
to offer module authors a way to be a little oecumenical, so they can
easily offer named parameters that follow the one_true_perl_convention or
even the baddlyNamedCamelCaseConvention.

I have looked for a module that would do this, but could not find anything
on CPAN.

So I wrote it.

Does it make sense? Did I miss a module that would do it? Does the name
make sense (other possibilities I can think of would be Params::ChangeName
Params::ConvertName)? Any other comment?


SYNOPSIS
      use Params::Normalize qw( perl_style_params);
      ...
      my_sub( $arg, camelCasedOption => 'fooBar',
                    hideousIMHO => 1,
                    badBADBad => 'foo'
            );
      ...
      sub my_sub
        { my( $arg, @opts)= @_;
              my %opts= perl_style_params( @opts);
          # %opts is now:
              # camel_case_option => 'fooBar',
              # hideous_IMHO      => 1,
              # bad_BAD_bad       => 'foo'
          ...

ABSTRACT
    Params::Normalize offers functions to convert named parameters from
    perl_style to javaStyle and vice-versa

DESCRIPTION
    perl_style_params %opts (or @opts)
        Converts the keys of %opts into perl_style keys

    javaStyleParams %opts (or @opts)
        Converts the keys of %opts into javaStyle keys

    JavaStyleParams %opts (or @opts)
        Converts the keys of %opts into JavaStyle keys

  EXPORT
        None by default.

SEE ALSO
        perl

AUTHOR
        Michel Rodriguez, <[EMAIL PROTECTED]>

COPYRIGHT AND LICENSE
        Copyright 2003 by Michel Rodriguez

        This library is free software; you can redistribute it and/or
        modify it under the same terms as Perl itself.


Michel Rodriguez
Perl &amp; XML
http://www.xmltwig.com

Reply via email to