blib/lib/ArrayData/Lingua/Word/EN/Enable.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package ArrayData::Lingua::Word::EN::Enable;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 with 'ArrayDataRole::Source::LinesInDATA';
6 1 with 'ArrayDataRole::BinarySearch::LinesInHandle'; # add has_item() that uses binary search
7 1 with 'Role::TinyCommons::Collection::FindItem::Iterator'; # add find_item() (has_item already added above)
8 1 with 'Role::TinyCommons::Collection::PickItems::RandomSeekLines'; # add pick_items() that uses binary search
9  
10 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11 1 our $DATE = '2022-03-27'; # DATE
12 1 our $DIST = 'ArrayData-Lingua-Word-EN-Enable'; # DIST
13 1 our $VERSION = '0.003'; # VERSION
14  
15 # STATS
16  
17 1 1;
18 # ABSTRACT: The Enable word list (English)
19  
20 =pod
21  
22 =encoding UTF-8
23  
24 =head1 NAME
25  
26 ArrayData::Lingua::Word::EN::Enable - The Enable word list (English)
27  
28 =head1 VERSION
29  
30 This document describes version 0.003 of ArrayData::Lingua::Word::EN::Enable (from Perl distribution ArrayData-Lingua-Word-EN-Enable), released on 2022-03-27.
31  
32 =head1 SYNOPSIS
33  
34 use ArrayData::Lingua::Word::EN::Enable;
35  
36 my $ary = ArrayData::Lingua::Word::EN::Enable->new;
37  
38 # Iterate the elements
39 $ary->reset_iterator;
40 while ($ary->has_next_item) {
41 my $element = $ary->get_next_item;
42 ... # do something with the element
43 }
44  
45 # Another way to iterate
46 $ary->each_item(sub { my ($item, $obj, $pos) = @_; ... }); # return false in anonsub to exit early
47  
48 # Get elements by position (array index)
49 my $element = $ary->get_item_at_pos(0); # get the first element
50 my $element = $ary->get_item_at_pos(90); # get the 91th element, will die if there is no element at that position.
51  
52 # Get number of elements in the list
53 my $count = $ary->get_item_count;
54  
55 # Get all elements from the list
56 my @all_elements = $ary->get_all_items;
57  
58 # Find an item.
59 my @found = $ary->find_item(item => 'foo');
60 my $has_item = $ary->has_item('foo'); # bool
61  
62 # Pick one or several random elements.
63 my $element = $ary->pick_item;
64 my @elements = $ary->pick_items(n=>3);
65  
66 =head1 DESCRIPTION
67  
68 =head1 HOMEPAGE
69  
70 Please visit the project's homepage at L<https://metacpan.org/release/ArrayData-Lingua-Word-EN-Enable>.
71  
72 =head1 SOURCE
73  
74 Source repository is at L<https://github.com/perlancar/perl-ArrayData-Lingua-Word-EN-Enable>.
75  
76 =head1 SEE ALSO
77  
78 L<WordList::EN::Enable> is the previous reincarnation, which in turn was
79 converted from Converted from L<Games::Word::Wordlist::Enable> 2010090401.
80  
81 =head1 AUTHOR
82  
83 perlancar <perlancar@cpan.org>
84  
85 =head1 CONTRIBUTING
86  
87  
88 To contribute, you can send patches by email/via RT, or send pull requests on
89 GitHub.
90  
91 Most of the time, you don't need to build the distribution yourself. You can
92 simply modify the code, then test via:
93  
94 % prove -l
95  
96 If you want to build the distribution (e.g. to try to install it locally on your
97 system), you can install L<Dist::Zilla>,
98 L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
99 Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required
100 beyond that are considered a bug and can be reported to me.
101  
102 =head1 COPYRIGHT AND LICENSE
103  
104 This software is copyright (c) 2022 by perlancar <perlancar@cpan.org>.
105  
106 This is free software; you can redistribute it and/or modify it under
107 the same terms as the Perl 5 programming language system itself.
108  
109 =head1 BUGS
110  
111 Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=ArrayData-Lingua-Word-EN-Enable>
112  
113 When submitting a bug or request, please include a test-file or a
114 patch to an existing test-file that illustrates the bug or desired
115 feature.
116  
117 =cut
118  
119 __DATA__
↑ Summary