line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WordList::Test::OneTwo; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
131664
|
use strict; |
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
775
|
use WordList; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
199
|
|
7
|
|
|
|
|
|
|
our @ISA = qw(WordList); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2021-09-26'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'WordList'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.7.11'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our %STATS = ("avg_word_len",3,"num_words_contain_whitespace",0,"num_words_contain_nonword_chars",0,"longest_word_len",3,"num_words",2,"num_words_contain_unicode",0,"num_words_contains_whitespace",0,"num_words_contains_nonword_chars",0,"shortest_word_len",3,"num_words_contains_unicode",0); # STATS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
# ABSTRACT: Wordlist that contains "one" and "two" |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=pod |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=encoding UTF-8 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
WordList::Test::OneTwo - Wordlist that contains "one" and "two" |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 VERSION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
This document describes version 0.7.11 of WordList::Test::OneTwo (from Perl distribution WordList), released on 2021-09-26. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use WordList::Test::OneTwo; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $wl = WordList::Test::OneTwo->new; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Pick a (or several) random word(s) from the list |
38
|
|
|
|
|
|
|
my ($word) = $wl->pick; |
39
|
|
|
|
|
|
|
my ($word) = $wl->pick(1); # ditto |
40
|
|
|
|
|
|
|
my @words = $wl->pick(3); # no duplicates |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# Check if a word exists in the list |
43
|
|
|
|
|
|
|
if ($wl->word_exists('foo')) { ... } # case-sensitive |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Call a callback for each word |
46
|
|
|
|
|
|
|
$wl->each_word(sub { my $word = shift; ... }); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Iterate |
49
|
|
|
|
|
|
|
my $first_word = $wl->first_word; |
50
|
|
|
|
|
|
|
while (defined(my $word = $wl->next_word)) { ... } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# Get all the words (beware, some wordlists are *huge*) |
53
|
|
|
|
|
|
|
my @all_words = $wl->all_words; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 HOMEPAGE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Please visit the project's homepage at L. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SOURCE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Source repository is at L. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
perlancar |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 CONTRIBUTING |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
To contribute, you can send patches by email/via RT, or send pull requests on |
71
|
|
|
|
|
|
|
GitHub. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Most of the time, you don't need to build the distribution yourself. You can |
74
|
|
|
|
|
|
|
simply modify the code, then test via: |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
% prove -l |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
If you want to build the distribution (e.g. to try to install it locally on your |
79
|
|
|
|
|
|
|
system), you can install L, |
80
|
|
|
|
|
|
|
L, and sometimes one or two other |
81
|
|
|
|
|
|
|
Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required |
82
|
|
|
|
|
|
|
beyond that are considered a bug and can be reported to me. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This software is copyright (c) 2021, 2020, 2018, 2017, 2016 by perlancar . |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
89
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 BUGS |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website L |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
96
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
97
|
|
|
|
|
|
|
feature. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
__DATA__ |