The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lingua::Pangram - Is this string a pangram

SYNOPSIS

  use Lingua::Pangram;
  my $pan = Lingua::Pangram->new;
  print "is a pangram" if $pan->pangram("a string");

  # alternative alphabet
  # add a" o" u" sz
  my $german = Lingua::Pangram->new(
                 [ 'a' .. 'z', "\xe4", "\xf6", "\xfc", "\xdf" ]
               );
  print "is a German pangram" if
    $german->pangram("eine Zeichenkette");

DESCRIPTION

This module exports no functions. It has an object-oriented interface with one method: pangram. This method takes a string and returns 1 if the string passed in contains all the letters of the alphabet, otherwise it returns 0.

It is possible to change the notion of what comprises "all the letters of the alphabet" by passing in an alternative set to the ->new method as a reference to an array containing all possible (lowercase) letters. The default set is 'a' .. 'z'.

The pangram method will lowercase the string prior to testing for the letters. It uses locale for this, so you may get incorrect results if your locale is not set up correctly.

AVAILABILITY

It should be available for download from http://russell.matbouli.org/code/lingua-pangram/ or from CPAN, in the directory authors/id/I/ID/IDORU.

AUTHOR

Russell Matbouli <lingua-pangram-spam@russell.matbouli.org>

http://russell.matbouli.org/

CONTRIBUTORS

Thanks to Philip Newton for a patch

TODO

Perhaps create minpangram which tests whether the string contains exactly one of each letter.

LICENSE

Distributed under GPL v2. See COPYING included with this distibution.

SEE ALSO

perl(1), locale.