>> 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?

Wow, seriously, chill out. 'Obliterate' isn't for formatting HTML into  
text (i.e. taking an HTML part of an email and generating a text part)  
it is for obliterating HTML, say for quick XSS purposes. Nothing more  
nothing less, and it does not claim to be anything other than that.

European textual characters etc should be in a character set as the  
entity itself not as an HTML entity version. If I want to keep certain  
symbols that are entities I use HTML::Entities to decode them first.

Plus, I never said blindly use one module and only one module, I said  
use either (and others!) and explained the current shortcomings of  
HTML::Strip and the differences in the 2 modules in questions' purposes.

And as for a little whimsy with the alias's: lighten up, it's part of  
what makes perl fun. It's not the first to put a little joke in the  
code.
(For example, I just stumbled across this whilst noting your rant to  
the author of the module you are hating on:

http://cpanratings.perl.org/dist/Perl-Dist-Strawberry
    "Strawberry Perl is made of 80% win, 10% lovely fluffy kittens,  
and 10% tasty wholesome organ meat. It is truly a glorious thing"

Perhaps you need to don your cape and go tell him that there is no  
organ meat in code and that the kittens are not fluffy they are matted  
at best?)

I'd be more inclined to use the other module more if its bugs were  
ever fixed:

   http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Strip

Perhaps you can offer some patches to the developer? Especially the  
utf-8 one, I mean who needs all that fancy  European, Japanese,  
Russian, Chinese, etc, etc anyway right :)

My point of course is to lighten up and stop scaring people away!

>  only wrapping a single regular expression it obfuscates
> what is really only a single regular expression and thus makes finding
> bugs much harder.

It's wrapping 2 or 3 plus some list logic, the point is it  
encapsulates re-useable logic, which is a good idea even for "simple"  
logic since it can change and therefor an update is only required in  
one place.

> Here are some of the ways the module breaks-
>
> >perl -MHTML::Obliterate -le 'print  
> HTML::Obliterate::kill_html(shift)' '© 1999'
> 1999

Again it's not an HTML to Text converter, its a 'remove tags and  
entities'. Any entities you want to keep should be decoded first. It  
appears (via rt) the Obliterate author will make doing so part of the  
call at some point.

> >perl -MHTML::Obliterate -le 'print  
> HTML::Obliterate::kill_html(shift)' ' 1 < 2 and 3 > 5'
> 1  5

So does HTML::Strip :: http://rt.cpan.org/Public/Bug/Display.html?id=35345

It's a problem in interpreting the data/context which Obliterate make  
no claims to do

> >perl -MHTML::Obliterate -le 'print  
> HTML::Obliterate::kill_html(shift)' '<img src="..." alt="<hi!>" />'
> " />

That is resolved in 0.3 (released last night (i.e the Author responded  
immediately instead of letting major stuff sit there ;p))

> 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?

Again all I said was tot he OP was "HTML::Truncate will do what you  
want and if you want to just strip out HTML here's a module you could  
use" I didn't yell at,  be-rate, or insult anyone. When an alternative  
showed up I looked it over and brought up some points about it.

Now that we've gone waaaaaaay off topic  from this thread I think it's  
time you and I  give everyone a break and if you really feel you need  
to yell at me some more please just email me directly. Otherwise thank  
you for sharing your opinion even if it was delivered in the worst  
possible way.

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to