File Coverage

blib/lib/WordList/Test/OneTwo.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package WordList::Test::OneTwo;
2              
3             our $DATE = '2021-06-23'; # DATE
4             our $VERSION = '0.7.10'; # VERSION
5              
6 2     2   143408 use WordList;
  2         5  
  2         210  
7             our @ISA = qw(WordList);
8              
9             our %STATS = ("num_words",2,"num_words_contains_unicode",0,"shortest_word_len",3,"num_words_contain_nonword_chars",0,"longest_word_len",3,"avg_word_len",3,"num_words_contain_unicode",0,"num_words_contains_whitespace",0,"num_words_contain_whitespace",0,"num_words_contains_nonword_chars",0); # STATS
10              
11             1;
12             # ABSTRACT: Wordlist that contains "one" and "two"
13              
14             =pod
15              
16             =encoding UTF-8
17              
18             =head1 NAME
19              
20             WordList::Test::OneTwo - Wordlist that contains "one" and "two"
21              
22             =head1 VERSION
23              
24             This document describes version 0.7.10 of WordList::Test::OneTwo (from Perl distribution WordList), released on 2021-06-23.
25              
26             =head1 SYNOPSIS
27              
28             use WordList::Test::OneTwo;
29              
30             my $wl = WordList::Test::OneTwo->new;
31              
32             # Pick a (or several) random word(s) from the list
33             my ($word) = $wl->pick;
34             my ($word) = $wl->pick(1); # ditto
35             my @words = $wl->pick(3); # no duplicates
36              
37             # Check if a word exists in the list
38             if ($wl->word_exists('foo')) { ... } # case-sensitive
39              
40             # Call a callback for each word
41             $wl->each_word(sub { my $word = shift; ... });
42              
43             # Iterate
44             my $first_word = $wl->first_word;
45             while (defined(my $word = $wl->next_word)) { ... }
46              
47             # Get all the words (beware, some wordlists are *huge*)
48             my @all_words = $wl->all_words;
49              
50             =head1 HOMEPAGE
51              
52             Please visit the project's homepage at L.
53              
54             =head1 SOURCE
55              
56             Source repository is at L.
57              
58             =head1 BUGS
59              
60             Please report any bugs or feature requests on the bugtracker website L
61              
62             When submitting a bug or request, please include a test-file or a
63             patch to an existing test-file that illustrates the bug or desired
64             feature.
65              
66             =head1 AUTHOR
67              
68             perlancar
69              
70             =head1 COPYRIGHT AND LICENSE
71              
72             This software is copyright (c) 2021, 2020, 2018, 2017, 2016 by perlancar@cpan.org.
73              
74             This is free software; you can redistribute it and/or modify it under
75             the same terms as the Perl 5 programming language system itself.
76              
77             =cut
78              
79             __DATA__