Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: RFC: HTML::?Filter ... suggest a name for the beast

by Gavin (Archbishop)
on May 01, 2006 at 13:13 UTC ( [id://546665]=note: print w/replies, xml ) Need Help??


in reply to RFC: HTML::?Filter ... suggest a name for the beast

You said it yourself!!
HTML::TagFilter::Simple
  • Comment on Re: RFC: HTML::?Filter ... suggest a name for the beast

Replies are listed 'Best First'.
Re^2: RFC: HTML::?Filter ... suggest a name for the beast
by Jenda (Abbot) on May 01, 2006 at 13:37 UTC

    That sounds as if it depended on or belonged to the HTML::TagFilter. I would not want to stomp on someone elses namespace. So maybe rather "HTML::SimpleTagFilter".

    I'd rather if we could find a way to communicate that the module is controled by a string containing the allowed tags&attribs instead of from within the code.</P

      Foo::Bar::Simple (or Foo::Bar::Lite) is often written by someone other than the author of Foo::Bar. This is a common practice and well accepted by the community. If you have any concerns, ask modules@perl.org and they'll help out.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

        Well, yes, actually one of my modules follows this naming style. Win32::Daemon::Simple provides a simplified (yet at the same time extended) interface to Win32::Daemon. The thing is that HTML::?Filter doesn't use HTML::TagFilter. Then there's CGI::Simple that provides part of the CGI.pm functionality and thus the code of the module is simpler ... this is not the case either. HTML::?Filter is totally independent to HTML::TagFilter. I did not know about HTML::TagFilter (if it even was already on CPAN which I doubt) when writing HTML::?Filter.

      Maybe something in the way your module's working can give someone an idea? What about posting the POD of the module here, to see it it lights a bulb somewhere?

        There's not a lot to document so I think the synopsis will suffice:

        use HTML::JFilter; my $filter = new HTML::JFilter <<'*END*' b i code pre br a: href name font: color size style *END* $filteredHTML = $filter->doSTRING($enteredHTML); $filter->doFILE($inputfile, $outputfile);

        I don't like the interface either actually. Maybe the methods should be Filter() and FilterFile(). Or maybe I could provide a functional interface instead or in adition:

        my $filter = HTML::JFilter::MakeFilter ($allowed_tags); $filtered = $filter->( $html);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://546665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found