in reply to creating a wrapper module for bacward compatibility
Personally, I think explicitly mapping old to new like this is a good thing. I'm a geek, so I'd write something that did it for me. This way you have a single place to look up all the translations, and if you need to tweak one of the parameters, then you can do so easily.
A few years ago, I would have done it via AUTOLOAD. That approach is only going to work when you have known rules for mapping the old way to the new way. Any oddballs would require coding them up explicitly and using AUTOLOAD for the default case. Now days I'd prefer to spell everything out and not worry about any of the corner cases. This is the triumph of true laziness over false laziness.
- doug
BTW: To get the list of things to be translated, write a little script that has use MyPackage; and then look through the MyPackage symbol table. Run them through a loop (map?) and spit out the default translators. I'd give you the syntax for doing this, but I know that I never get it right the first time or two. I don't have the time to get it right, and I don't want to send you off on a syntactical wild goose chase.
|
|---|