File Coverage

blib/lib/ArrayData/Lingua/Word/ID/KBBI/ByClass/Adverb.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb;
2              
3 1     1   320371 use strict;
  1         2  
  1         49  
4 1     1   6 use warnings;
  1         3  
  1         76  
5              
6 1     1   666 use Role::Tiny::With;
  1         9902  
  1         162  
7             #with 'ArrayDataRole::Spec::Basic';
8             with 'ArrayDataRole::Source::LinesInDATA';
9              
10             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11             our $DATE = '2024-11-19'; # DATE
12             our $DIST = 'ArrayData-Lingua-Word-ID-KBBI-ByClass-Adverb'; # DIST
13             our $VERSION = '0.001'; # VERSION
14              
15             # STATS
16              
17             1;
18             # ABSTRACT: Indonesian adverb words from KBBI (Kamus Besar Bahasa Indonesia)
19              
20             =pod
21              
22             =encoding UTF-8
23              
24             =head1 NAME
25              
26             ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb - Indonesian adverb words from KBBI (Kamus Besar Bahasa Indonesia)
27              
28             =head1 VERSION
29              
30             This document describes version 0.001 of ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb (from Perl distribution ArrayData-Lingua-Word-ID-KBBI-ByClass-Adverb), released on 2024-11-19.
31              
32             =head1 SYNOPSIS
33              
34             use ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb;
35              
36             my $ary = ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb->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 (by iterating). See Role::TinyCommons::Collection::FindItem::Iterator for more details.
59             $ary->apply_roles('FindItem::Iterator'); # or: $ary = ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb->new->apply_roles(...);
60             my @found = $ary->find_item(item => 'foo');
61             my $has_item = $ary->has_item('foo'); # bool
62              
63             # Pick one or several random elements (apply one of these roles first: Role::TinyCommons::Collection::PickItems::{Iterator,RandomPos,RandomSeekLines})
64             $ary->apply_roles('PickItems::Iterator'); # or: $ary = ArrayData::Lingua::Word::ID::KBBI::ByClass::Adverb->new->apply_roles(...);
65             my $element = $ary->pick_item;
66             my @elements = $ary->pick_items(n=>3);
67              
68             =head1 DESCRIPTION
69              
70             =head1 HOMEPAGE
71              
72             Please visit the project's homepage at L.
73              
74             =head1 SOURCE
75              
76             Source repository is at L.
77              
78             =head1 SEE ALSO
79              
80             L contains the same data.
81              
82             =head1 AUTHOR
83              
84             perlancar
85              
86             =head1 CONTRIBUTING
87              
88              
89             To contribute, you can send patches by email/via RT, or send pull requests on
90             GitHub.
91              
92             Most of the time, you don't need to build the distribution yourself. You can
93             simply modify the code, then test via:
94              
95             % prove -l
96              
97             If you want to build the distribution (e.g. to try to install it locally on your
98             system), you can install L,
99             L,
100             L, and sometimes one or two other
101             Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
102             that are considered a bug and can be reported to me.
103              
104             =head1 COPYRIGHT AND LICENSE
105              
106             This software is copyright (c) 2024 by perlancar .
107              
108             This is free software; you can redistribute it and/or modify it under
109             the same terms as the Perl 5 programming language system itself.
110              
111             =head1 BUGS
112              
113             Please report any bugs or feature requests on the bugtracker website L
114              
115             When submitting a bug or request, please include a test-file or a
116             patch to an existing test-file that illustrates the bug or desired
117             feature.
118              
119             =cut
120              
121             __DATA__