Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Front Paging Profanity

by bart (Canon)
on Oct 16, 2002 at 09:32 UTC ( [id://205661]=note: print w/replies, xml ) Need Help??


in reply to Re: Front Paging Profanity
in thread Front Paging Profanity

Perhaps filtering the content through Regex::Common::profanity as a default option may be of interest.
Before you get too enthousiastic about this approach, may I point you to this journal entry on use.perl.org?

Replies are listed 'Best First'.
Re: Re: Re: Front Paging Profanity
by ignatz (Vicar) on Oct 16, 2002 at 11:30 UTC

    WARNING: You must be at least 21 years old or authorized by a guardian to read this post.

      Sigh. There's nothing wrong with the module. Try using case insensitivity:
      /$RE{profanity}/i and print " contains profanity";
      And you'll need $RE{profanity}{contextual} to catch that seventh word, since there is nothing profane about members of the avian family Paridae.

      Oh, and the test will work better if you don't try to import the non-existent profanity subroutine.

        Well, Fudge. I knew that I was inferior. Thanks for reaffirming.

        The code was ripped directly from the POD:

        use Regexp::Common qw /profanity/; while (<>) { /$RE{profanity}/ and print "Contains profanity\n"; } ... =head2 $RE{profanity} Returns a pattern matching words -- such as Carlin's "big seven"
        I will respectfully disagree with your statement that there is nothing "wrong" with the module, since Fu**, FU** and fu** are profanity. It would be clearer to indicate the need for the /i in the modules POD. It was my mistake to not use the /i switch, but it is easy to see that I could make it since I am using the module as instructed expecting what it says will result... a case where Perl's rules of case sensitivity don't match up with the FCC's for what is profane. Yes, it is just the documentation, but for me documentation is just as important as any other aspect of code.

        I should add that I am impressed as hell that this module works. I am even more impressed that I have no f___ing clue as to how it works. I am not worthy.

        BTW, I am deeply sorry to have earned one of your sighs. I have the deepest respect for your work and the last thing I want to be is another one of the FUD Meisters that nitpick your contributions. In truth my comments were little more than an excuse for levity on what to me was a non-issue. I'm sorry that your hard work was used as fodder for what I sometimes mistake as humor.

        ()-()
         \"/
          `                                                     
        
      Surely, I can't be the only one who recognized the "seven dirty words..."

      ...it sounds like a snack. You could have "tater tits" and "taco tits." Betcha can't eat just one!
      --- George Carlin

      ...and don't call me 'Shirley.'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found