in reply to Help Debug Switch.pm!
The hardest part about parsing Perl is that you have to track both entries in the symbol table and token types in the input stream in order to decide when / is division vs. a regular expression and when ? is the trinary operator vs. a regular expression.
I seriously doubt that Switch.pm will ever solve this problem completely for Perl5 simply because the effort involved is more than a sane person would do.
Anyway, I wanted to strongly discourage the use of such complicated magic for any serious (a.k.a. production) scripts. You could easily find no problem with it at first and then make a minor change and find yourself either making "voodoo" changes (like remove '?'s from comments) in order to make Switch.pm happy or having to do a major rewrite to remove your dependence on that module.
- tye (but my friends call me "Tye")
|
|---|