in reply to Re: Case-insensitive, dash-optional named parameters for your functions
in thread Case-insensitive, dash-optional named parameters for your functions

Very clever!

But it only seems to support Tk-style parameters. If I call the routine without leading dashes in the parameter names, it doesn't work, nor can I make Getopt::Long ignore underscores to enable LWP-style named parameters.

Still, very clever code reuse there.

  • Comment on Re^2: Case-insensitive, dash-optional named parameters for your functions

Replies are listed 'Best First'.
Re^3: Case-insensitive, dash-optional named parameters for your functions
by ikegami (Patriarch) on Nov 09, 2004 at 15:06 UTC
    About the leading dashes, you can configure Getopt::Long to not require the leading dashes. Check out this thread and specifically my answer. In addition, you can do 'paramname|ParamName|param_name=i' => \$param_name to read the different styles.

      Nice.