On Tuesday, June 24, 2003, at 09:00 AM, Michel Rodriguez wrote:
On Tue, 24 Jun 2003, Ken Williams wrote:
On Monday, June 23, 2003, at 04:29 PM, Michel Rodriguez wrote:
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.
We created a converter like this for Mason, in HTML::Mason::ApacheHandler . In this case, we needed to switch back & forth between 'MasonAllowGlobals' and 'allow_globals'.
I could easily expose a function that would let you pass a code ref so you
can tweak the keys as much as you want.
Yeah, or we could probably just do 'Mason'.JavaStyleParams($string) and the like.
Maybe this could just be a patch to Hash::Util but at the moment
Hash::Util provides only functions to lock/unlock hashes, so I don't know
if the two feature sets really belong together.
Nah, I think this would be best as a separate module like you proposed.
I think the name could use a little work though - I think the Params:: namespace is correct, but maybe something like Params::CaseShifter or Params::CaseStyle or something might be more appropriate? More ideas?
-Ken
