ArrayData/Char/Latin1/UpperCaseLetter.pm

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