blib/lib/WordList/Phrase/EN/Idiom/Wiktionary.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package WordList::Phrase::EN::Idiom::Wiktionary;
2  
3 1 our $DATE = '2016-02-10'; # DATE
4 1 our $VERSION = '0.01'; # VERSION
5  
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use WordList;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 our @ISA = qw(WordList);
10  
11 1 our %STATS = ("num_words",8479,"num_words_contains_unicode",4,"num_words_contains_whitespace",8151,"avg_word_len",14.4614931006015,"shortest_word_len",3,"longest_word_len",83,"num_words_contains_nonword_chars",8401); # STATS
12  
13 1 1;
14 # ABSTRACT: English idioms from wiktionary.org
15  
16 =pod
17  
18 =encoding UTF-8
19  
20 =head1 NAME
21  
22 WordList::Phrase::EN::Idiom::Wiktionary - English idioms from wiktionary.org
23  
24 =head1 VERSION
25  
26 This document describes version 0.01 of WordList::Phrase::EN::Idiom::Wiktionary (from Perl distribution WordList-Phrase-EN-Idiom-Wiktionary), released on 2016-02-10.
27  
28 =head1 SYNOPSIS
29  
30 use WordList::Phrase::EN::Idiom::Wiktionary;
31  
32 my $wl = WordList::Phrase::EN::Idiom::Wiktionary->new;
33  
34 # Pick a (or several) random word(s) from the list
35 my $word = $wl->pick;
36 my @words = $wl->pick(3);
37  
38 # Check if a word exists in the list
39 if ($wl->word_exists('foo')) { ... }
40  
41 # Call a callback for each word
42 $wl->each_word(sub { my $word = shift; ... });
43  
44 # Get all the words
45 my @all_words = $wl->all_words;
46  
47 =head1 STATISTICS
48  
49 +----------------------------------+------------------+
50 | key | value |
51 +----------------------------------+------------------+
52 | avg_word_len | 14.4614931006015 |
53 | longest_word_len | 83 |
54 | num_words | 8479 |
55 | num_words_contains_nonword_chars | 8401 |
56 | num_words_contains_unicode | 4 |
57 | num_words_contains_whitespace | 8151 |
58 | shortest_word_len | 3 |
59 +----------------------------------+------------------+
60  
61 The statistics is available in the C<%STATS> package variable.
62  
63 =head1 HOMEPAGE
64  
65 Please visit the project's homepage at L<https://metacpan.org/release/WordList-Phrase-EN-Idiom-Wiktionary>.
66  
67 =head1 SOURCE
68  
69 Source repository is at L<https://github.com/perlancar/perl-WordList-Phrase-EN-Idiom-Wiktionary>.
70  
71 =head1 BUGS
72  
73 Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=WordList-Phrase-EN-Idiom-Wiktionary>
74  
75 When submitting a bug or request, please include a test-file or a
76 patch to an existing test-file that illustrates the bug or desired
77 feature.
78  
79 =head1 SEE ALSO
80  
81 L<https://en.wiktionary.org/wiki/Category:English_idioms>
82  
83 =head1 AUTHOR
84  
85 perlancar <perlancar@cpan.org>
86  
87 =head1 COPYRIGHT AND LICENSE
88  
89 This software is copyright (c) 2016 by perlancar@cpan.org.
90  
91 This is free software; you can redistribute it and/or modify it under
92 the same terms as the Perl 5 programming language system itself.
93  
94 =cut
95  
96 __DATA__
↑ Summary