cleverett has asked for the wisdom of the Perl Monks concerning the following question:
What's wrong with all of these is the OO interface. I just can't get real excited about OO interfaces for filters.
So instead of
I would so much rather have a procedural interfaceuse strict; use HTML::OOMarkupRemover; my $hsmr = HTML::SomeMarkupRemover->new(\%html_rules); $hsmr->passes_rules($some_html) or die "Ack! I can't cope!"; my $clean_html = $htmr->apply_rules($some_html);
So: anyone know of a module like that?use strict; use HTML::ProceduralMarkupRemover; html_passes_rules($some_html, \%html_rules) or die "Ack! I can't cope!"; my $clean_html = apply_html_rules($come_html, \%html_rules);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cleaning up HTML tags
by esh (Pilgrim) on Aug 25, 2003 at 04:36 UTC | |
by cleverett (Friar) on Aug 25, 2003 at 05:18 UTC | |
by esh (Pilgrim) on Aug 25, 2003 at 05:52 UTC | |
|
Re: Cleaning up HTML tags
by bobn (Chaplain) on Aug 25, 2003 at 05:22 UTC | |
|
Re: Cleaning up HTML tags
by antirice (Priest) on Aug 25, 2003 at 04:57 UTC | |
by cleverett (Friar) on Aug 25, 2003 at 05:58 UTC | |
by mr_stru (Sexton) on Aug 26, 2003 at 03:03 UTC | |
by cleverett (Friar) on Aug 27, 2003 at 03:29 UTC |