blib/lib/WordList/Phrase/ZH/Proverb/Wiktionary.pm

filter: Statementstmt 66.6% 4 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 6 / 8 CC 1 SCAR 1.4
CC
1
Cov
67%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
↑ Summary
1 package WordList::Phrase::ZH::Proverb::Wiktionary;
2  
3 our $DATE = '2016-02-10'; # DATE
4 our $VERSION = '0.01'; # VERSION
5  
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶use WordList;
Subroutine BEGIN: called CC=1 SCAR=2.6
9 our @ISA = qw(WordList);
10  
11 our %STATS = ("shortest_word_len",4,"num_words",292,"num_words_contains_whitespace",0,"num_words_contains_nonword_chars",108,"longest_word_len",13,"num_words_contains_unicode",292,"avg_word_len",7.1986301369863); # STATS
12  
13 1;
14 # ABSTRACT: Chinese proverbs from wiktionary.org
15  
16 =pod
17  
18 =encoding UTF-8
19  
20 =head1 NAME
21  
22 WordList::Phrase::ZH::Proverb::Wiktionary - Chinese proverbs from wiktionary.org
23  
24 =head1 VERSION
25  
26 This document describes version 0.01 of WordList::Phrase::ZH::Proverb::Wiktionary (from Perl distribution WordList-Phrase-ZH-Proverb-Wiktionary), released on 2016-02-10.
27  
28 =head1 SYNOPSIS
29  
30 use WordList::Phrase::ZH::Proverb::Wiktionary;
31  
32 my $wl = WordList::Phrase::ZH::Proverb::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 | 7.1986301369863 |
53 | longest_word_len | 13 |
54 | num_words | 292 |
55 | num_words_contains_nonword_chars | 108 |
56 | num_words_contains_unicode | 292 |
57 | num_words_contains_whitespace | 0 |
58 | shortest_word_len | 4 |
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-ZH-Proverb-Wiktionary>.
66  
67 =head1 SOURCE
68  
69 Source repository is at L<https://github.com/perlancar/perl-WordList-Phrase-ZH-Proverb-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-ZH-Proverb-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:Chinese_proverbs>
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