Terrence Brannon > Regexp-Profanity-US > Regexp::Profanity::US

Download:
Regexp-Profanity-US-1.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.4   Source  

NAME ^

Regexp::Profanity::US - Perl extension for detecting profanity

SYNOPSIS ^

  use Regexp::Profanity::US;

  my $degree  = 'definite'; # or 'ambiguous';

  my @profane = profane_list($string, $degree);
  my $profane = profane     ($string, $degree);

DESCRIPTION ^

This module provides an API for checking strings for strings containing various degrees of profanity, per US standards.

API ^

$profane_word = profane($string, $degree)

Check $string for profanity of degree $degree, where $degree eq 'definite' or $degree eq 'ambiguous'

For positive matches, returns TRUE, with TRUE being the first match in the string.

For negative matches, FALSE is returned.

@profane_word = profane_list($string, $degree)

The sub returns a list of all profane words found in $string, or an empty list if none were found.

EXPORT ^

profane() and profane_list

DEPENDENCIES ^

Regexp::Any

OTHER ^

There is another module supporting profanity checking, namely: Regexp::Common::profanity, but I had several issues with making practical use of it:

AUTHOR ^

T. M. Brannon, tbone@cpan.org

syntax highlighting: