| 1 | package WordList::CPAN::PAUSEID; | ||
| 2 | |||
| 3 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 4 | 1 | our $DATE = '2020-09-14'; # DATE | |
| 5 | 1 | our $DIST = 'WordList-CPAN-PAUSEID'; # DIST | |
| 6 | 1 | our $VERSION = '20200829.0.0'; # VERSION | |
| 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_contain_nonword_chars",2,"num_words_contains_whitespace",0,"shortest_word_len",2,"num_words_contains_nonword_chars",2,"longest_word_len",9,"num_words_contain_whitespace",0,"num_words",13930,"avg_word_len",6.36030150753769,"num_words_contain_unicode",0,"num_words_contains_unicode",0); # STATS | |
| 12 | |||
| 13 | 1 | 1; | |
| 14 | # ABSTRACT: CPAN PAUSE ID's | ||
| 15 | |||
| 16 | =pod | ||
| 17 | |||
| 18 | =encoding UTF-8 | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | WordList::CPAN::PAUSEID - CPAN PAUSE ID's | ||
| 23 | |||
| 24 | =head1 VERSION | ||
| 25 | |||
| 26 | This document describes version 20200829.0.0 of WordList::CPAN::PAUSEID (from Perl distribution WordList-CPAN-PAUSEID), released on 2020-09-14. | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | use WordList::CPAN::PAUSEID; | ||
| 31 | |||
| 32 | my $wl = WordList::CPAN::PAUSEID->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 | # Iterate | ||
| 45 | my $first_word = $wl->first_word; | ||
| 46 | while (defined(my $word = $wl->next_word)) { ... } | ||
| 47 | |||
| 48 | # Get all the words | ||
| 49 | my @all_words = $wl->all_words; | ||
| 50 | |||
| 51 | =head1 WORDLIST STATISTICS | ||
| 52 | |||
| 53 | +----------------------------------+------------------+ | ||
| 54 | | key | value | | ||
| 55 | +----------------------------------+------------------+ | ||
| 56 | | avg_word_len | 6.36030150753769 | | ||
| 57 | | longest_word_len | 9 | | ||
| 58 | | num_words | 13930 | | ||
| 59 | | num_words_contain_nonword_chars | 2 | | ||
| 60 | | num_words_contain_unicode | 0 | | ||
| 61 | | num_words_contain_whitespace | 0 | | ||
| 62 | | num_words_contains_nonword_chars | 2 | | ||
| 63 | | num_words_contains_unicode | 0 | | ||
| 64 | | num_words_contains_whitespace | 0 | | ||
| 65 | | shortest_word_len | 2 | | ||
| 66 | +----------------------------------+------------------+ | ||
| 67 | |||
| 68 | The statistics is available in the C<%STATS> package variable. | ||
| 69 | |||
| 70 | =head1 HOMEPAGE | ||
| 71 | |||
| 72 | Please visit the project's homepage at L<https://metacpan.org/release/WordList-CPAN-PAUSEID>. | ||
| 73 | |||
| 74 | =head1 SOURCE | ||
| 75 | |||
| 76 | Source repository is at L<https://github.com/perlancar/perl-WordList-CPAN-PAUSEID>. | ||
| 77 | |||
| 78 | =head1 BUGS | ||
| 79 | |||
| 80 | Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=WordList-CPAN-PAUSEID> | ||
| 81 | |||
| 82 | When submitting a bug or request, please include a test-file or a | ||
| 83 | patch to an existing test-file that illustrates the bug or desired | ||
| 84 | feature. | ||
| 85 | |||
| 86 | =head1 AUTHOR | ||
| 87 | |||
| 88 | perlancar <perlancar@cpan.org> | ||
| 89 | |||
| 90 | =head1 COPYRIGHT AND LICENSE | ||
| 91 | |||
| 92 | This software is copyright (c) 2020 by perlancar@cpan.org. | ||
| 93 | |||
| 94 | This is free software; you can redistribute it and/or modify it under | ||
| 95 | the same terms as the Perl 5 programming language system itself. | ||
| 96 | |||
| 97 | =cut | ||
| 98 | |||
| 99 | __DATA__ | ||