File Coverage

blib/lib/Games/Word/Wordlist/SGB.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Games::Word::Wordlist::SGB;
2              
3 1     1   69473 use 5.006;
  1         3  
  1         40  
4 1     1   5 use strict;
  1         3  
  1         36  
5 1     1   5 use warnings;
  1         6  
  1         36  
6 1     1   4 no warnings 'syntax';
  1         1  
  1         30  
7              
8 1     1   863 use Games::Word::Wordlist;
  1         44319  
  1         142  
9              
10             our @ISA = qw [Games::Word::Wordlist];
11             our $VERSION = '2010091501';
12              
13             sub new {
14 1     1 1 6149 bless Games::Word::Wordlist -> new ([map {split} ]), shift
  480         4079  
15             }
16              
17              
18             1;
19              
20              
21             =head1 NAME
22              
23             Games::Word::Wordlist::SGB - Wordlist from the Stanford GraphBase.
24              
25             =head1 SYNOPSIS
26              
27             use Games::Word::Wordlist::SGB;
28             my $wl = Games::Word::Wordlist::SGB -> new;
29             my $word = $wl -> random_word;
30             print "We have a word." if $wl -> is_word ($word);
31              
32             =head1 DESCRIPTION
33              
34             C<< Games::Word::Wordlist::SGB >> subclasses C<< Games::Word::Wordlist >>,
35             giving you a managable wordlist preloaded with the words from the Stanford
36             GraphBase. C<< Games::Word::Wordlist::SGB >> defines
37             just one method, the class method C<< new >>, which doesn't take any
38             arguments.
39              
40             Since C<< Games::Word::Wordlist >> is subclassed, all its methods (except
41             C<< new >>) are available.
42              
43             The Stanford GraphBase is a set of freely available programs and data
44             files, used by Donald E. Knuth to create examples for his Volume 4 of
45             I<< The Art of Computer Programming >>. The Stanford GraphBase contains
46             a list of the 5757 most used 5-letter English words. This module contains
47             this list.
48              
49             =head1 SEE ALSO
50              
51             C<< Games::Word::Wordlist >>.
52              
53             =head1 DEVELOPMENT
54              
55             The current sources of this module are found on github,
56             L<< git://github.com/Abigail/Games--Word--Wordlist--SGB.git >>.
57              
58             =head1 REFERENCES
59              
60             =over 4
61              
62             =item *
63              
64             L<< The Stanford GraphBase: A Platform for Combinatorial Computing|http://www-cs-faculty.stanford.edu/~uno/sgb.html >>
65              
66             =back
67              
68             =head1 AUTHOR
69              
70             Abigail, L<< mailto:cpan@abigail.be >>.
71              
72             =head1 COPYRIGHT and LICENSE
73              
74             Copyright (C) 2010 by Abigail, except the word list itself, which is
75             in the public domain.
76              
77             Permission is hereby granted, free of charge, to any person obtaining a
78             copy of this software and associated documentation files (the "Software"),
79             to deal in the Software without restriction, including without limitation
80             the rights to use, copy, modify, merge, publish, distribute, sublicense,
81             and/or sell copies of the Software, and to permit persons to whom the
82             Software is furnished to do so, subject to the following conditions:
83              
84             The above copyright notice and this permission notice shall be included
85             in all copies or substantial portions of the Software.
86              
87             THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88             IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89             FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
90             THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91             WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
92             OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
93             THE SOFTWARE.
94              
95             =head1 INSTALLATION
96              
97             To install this module, run, after unpacking the tar-ball, the
98             following commands:
99              
100             perl Makefile.PL
101             make
102             make test
103             make install
104              
105             =cut
106              
107             __DATA__