ArrayData/Char/Latin1/Letter.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« ArrayData/Char/Latin1/Digit.pm ↑ Summary ArrayData/Char/Latin1/UpperCaseLetter.pm »
1 package ArrayData::Char::Latin1::Letter;
2  
3 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
4 1 our $DATE = '2021-05-20'; # DATE
5 1 our $DIST = 'ArrayDataBundle-Char-Latin1'; # DIST
6 1 our $VERSION = '0.003'; # VERSION
7  
8 1 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 with 'ArrayDataRole::Source::LinesInDATA';
10 1 with 'Role::TinyCommons::Collection::FindItem::Iterator'; # add find_item() and has_item()
11 1 with 'Role::TinyCommons::Collection::PickItems::Iterator'; # add pick_items(), pick_item()
12  
13 # STATS
14  
15 1 1;
16 # ABSTRACT: Latin1 letters
17  
18 =pod
19  
20 =encoding UTF-8
21  
22 =head1 NAME
23  
24 ArrayData::Char::Latin1::Letter - Latin1 letters
25  
26 =head1 VERSION
27  
28 This document describes version 0.003 of ArrayData::Char::Latin1::Letter (from Perl distribution ArrayDataBundle-Char-Latin1), released on 2021-05-20.
29  
30 =head1 SYNOPSIS
31  
32 use ArrayData::Char::Latin1::Letter;
33  
34 my $ary = ArrayData::Char::Latin1::Letter->new;
35  
36 # Iterate the elements
37 $ary->reset_iterator;
38 while ($ary->has_next_item) {
39 my $element = $ary->get_next_item;
40 ... # do something with the element
41 }
42  
43 # Another way to iterate
44 $ary->each_item(sub { my ($item, $obj, $pos) = @_; ... }); # return false in anonsub to exit early
45  
46 # Get elements by position (array index)
47 my $element = $ary->get_item_at_pos(0); # get the first element
48 my $element = $ary->get_item_at_pos(90); # get the 91th element, will die if there is no element at that position.
49  
50 # Get number of elements in the list
51 my $count = $ary->get_item_count;
52  
53 # Get all elements from the list
54 my @all_elements = $ary->get_all_items;
55  
56 # Find an item.
57 my @found = $ary->find_item(item => 'foo');
58 my $has_item = $ary->has_item('foo'); # bool
59  
60 # Pick one or several random elements.
61 my $element = $ary->pick_item;
62 my @elements = $ary->pick_items(n=>3);
63  
64 =head1 DESCRIPTION
65  
66 For testing only.
67  
68 =head1 HOMEPAGE
69  
70 Please visit the project's homepage at L<https://metacpan.org/release/ArrayDataBundle-Char-Latin1>.
71  
72 =head1 SOURCE
73  
74 Source repository is at L<https://github.com/perlancar/perl-ArrayDataBundle-Char-Latin1>.
75  
76 =head1 BUGS
77  
78 Please report any bugs or feature requests on the bugtracker website L<https://github.com/perlancar/perl-ArrayDataBundle-Char-Latin1/issues>
79  
80 When submitting a bug or request, please include a test-file or a
81 patch to an existing test-file that illustrates the bug or desired
82 feature.
83  
84 =head1 SEE ALSO
85  
86 =head1 AUTHOR
87  
88 perlancar <perlancar@cpan.org>
89  
90 =head1 COPYRIGHT AND LICENSE
91  
92 This software is copyright (c) 2021 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__
« ArrayData/Char/Latin1/Digit.pm ↑ Summary ArrayData/Char/Latin1/UpperCaseLetter.pm »