On Apr 12, 2009, at 6:01 PM, Lee.M wrote: >> It is for all source appearances something that was meant to go in >> the >> Acme namespace and its regexes are really quite bad. > > I beg to differ, it's quite useful in certain circumstances. Care to > share what "really quite bad" means specifically or are you just > blindly stating unfounded opinion as fact?
I was just blindly stating unfounded opinion as fact. Now that you called me on it I'm forced to admit it. You should totally use this in your code. Just because the author doesn't seem to understand what the m and s flags mean in a regular expression or thinks that the only meaningful sub in a serious module should have 12 aliases called with goto... you should totally use this. Entities are for chumps, after all. Who needs all those fancy European letters and stupid typographical marks? ASCII got us to the Moon, why should we abandon it now? >> In general, never use a regex where a parser exists. It's false >> economy and much harder to get right than spending an hour or two >> learning the interface for a good parser. > > Depends on what you're using it for. If it's a complex task, sure use > a more complex module, if it's a simple task use a simple module (or a > complex module if you wish), whatever is fine :) It's a broken module and a broken approach and since it's, for all its 12 aliases, still only wrapping a single regular expression it obfuscates what is really only a single regular expression and thus makes finding bugs much harder. Here are some of the ways the module breaks- >perl -MHTML::Obliterate -le 'print HTML::Obliterate::kill_html (shift)' '© 1999' 1999 >perl -MHTML::Obliterate -le 'print HTML::Obliterate::kill_html (shift)' ' 1 < 2 and 3 > 5' 1 5 >perl -MHTML::Obliterate -le 'print HTML::Obliterate::kill_html (shift)' '<img src="..." alt="<hi!>" />' " /> So, when you recommended this to everyone could you share what you found so good about the code or were you just blindly substituting personal opinion for valid judgement? -Ashley _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
