| 1 | package TableData::Games::Cards::Troika; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use Role::Tiny::With; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | with 'TableDataRole::Source::CSVInDATA'; | |
| 8 | 1 | with 'TableDataRole::Spec::TableDef'; | |
| 9 | |||
| 10 | 0 | ▶ | sub get_table_def { |
|
Subroutine
get_table_def: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | return +{ | ||
| 12 | 0 | fields => { | |
| 13 | id1 => {pos=>0, schema=>'posint*'}, | ||
| 14 | id2 => {pos=>1, schema=>'str*'}, | ||
| 15 | |||
| 16 | type => {pos=>2, schema=>['str*', in=>[qw/object wildcard wildcard+cut/]]}, | ||
| 17 | |||
| 18 | eng_object_category_name => {pos=>3, schema=>'str*'}, | ||
| 19 | ind_object_category_name => {pos=>4, schema=>'str*'}, | ||
| 20 | fra_object_category_name => {pos=>5, schema=>'str*'}, | ||
| 21 | |||
| 22 | eng_object_name => {pos=>6, schema=>'str*'}, | ||
| 23 | ind_object_name => {pos=>7, schema=>'str*'}, | ||
| 24 | fra_object_name => {pos=>8, schema=>'str*'}, | ||
| 25 | |||
| 26 | eng_shape => {pos=>9, schema=>'str*'}, | ||
| 27 | ind_shape => {pos=>10, schema=>'str*'}, | ||
| 28 | fra_shape => {pos=>11, schema=>'str*'}, | ||
| 29 | |||
| 30 | eng_color => {pos=>12, schema=>'str*'}, | ||
| 31 | ind_color => {pos=>13, schema=>'str*'}, | ||
| 32 | fra_color => {pos=>14, schema=>'str*'}, | ||
| 33 | |||
| 34 | eng_size => {pos=>15, schema=>'str*'}, | ||
| 35 | ind_size => {pos=>16, schema=>'str*'}, | ||
| 36 | fra_size => {pos=>17, schema=>'str*'}, | ||
| 37 | |||
| 38 | quantity => {pos=>18, schema=>['posint*', in=>[1, 2, 3]]}, | ||
| 39 | |||
| 40 | eng_short_name => {pos=>19, schema=>'str*'}, | ||
| 41 | eng_descriptive_name => {pos=>20, schema=>'str*'}, | ||
| 42 | |||
| 43 | ind_short_name => {pos=>21, schema=>'str*'}, | ||
| 44 | ind_descriptive_name => {pos=>22, schema=>'str*'}, | ||
| 45 | |||
| 46 | fra_short_name => {pos=>23, schema=>'str*'}, | ||
| 47 | fra_descriptive_name => {pos=>24, schema=>'str*'}, | ||
| 48 | }, | ||
| 49 | pk => 'id1', | ||
| 50 | }; | ||
| 51 | } | ||
| 52 | |||
| 53 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 54 | 1 | our $DATE = '2026-07-16'; # DATE | |
| 55 | 1 | our $DIST = 'TableData-Games-Cards-Troika'; # DIST | |
| 56 | 1 | our $VERSION = '0.002'; # VERSION | |
| 57 | |||
| 58 | 1 | our %STATS = ("num_columns",25,"num_rows",99); # STATS | |
| 59 | |||
| 60 | 1 | 1; | |
| 61 | # ABSTRACT: Cards of Anak Bos Troika | ||
| 62 | |||
| 63 | =pod | ||
| 64 | |||
| 65 | =encoding UTF-8 | ||
| 66 | |||
| 67 | =head1 NAME | ||
| 68 | |||
| 69 | TableData::Games::Cards::Troika - Cards of Anak Bos Troika | ||
| 70 | |||
| 71 | =head1 VERSION | ||
| 72 | |||
| 73 | This document describes version 0.002 of TableData::Games::Cards::Troika (from Perl distribution TableData-Games-Cards-Troika), released on 2026-07-16. | ||
| 74 | |||
| 75 | =head1 SYNOPSIS | ||
| 76 | |||
| 77 | To use from Perl code: | ||
| 78 | |||
| 79 | use TableData::Games::Cards::Troika; | ||
| 80 | |||
| 81 | my $td = TableData::Games::Cards::Troika->new; | ||
| 82 | |||
| 83 | # Iterate rows of the table | ||
| 84 | $td->each_row_arrayref(sub { my $row = shift; ... }); | ||
| 85 | $td->each_row_hashref (sub { my $row = shift; ... }); | ||
| 86 | |||
| 87 | # Get the list of column names | ||
| 88 | my @columns = $td->get_column_names; | ||
| 89 | |||
| 90 | # Get the number of rows | ||
| 91 | my $row_count = $td->get_row_count; | ||
| 92 | |||
| 93 | See also L<TableDataRole::Spec::Basic> for other methods. | ||
| 94 | |||
| 95 | To use from command-line (using L<tabledata> CLI): | ||
| 96 | |||
| 97 | # Display as ASCII table and view with pager | ||
| 98 | % tabledata Games::Cards::Troika --page | ||
| 99 | |||
| 100 | # Get number of rows | ||
| 101 | % tabledata --action count_rows Games::Cards::Troika | ||
| 102 | |||
| 103 | See the L<tabledata> CLI's documentation for other available actions and options. | ||
| 104 | |||
| 105 | =head1 TABLEDATA STATISTICS | ||
| 106 | |||
| 107 | +-------------+-------+ | ||
| 108 | | key | value | | ||
| 109 | +-------------+-------+ | ||
| 110 | | num_columns | 25 | | ||
| 111 | | num_rows | 99 | | ||
| 112 | +-------------+-------+ | ||
| 113 | |||
| 114 | The statistics is available in the C<%STATS> package variable. | ||
| 115 | |||
| 116 | =for Pod::Coverage ^(get_table_def)$ | ||
| 117 | |||
| 118 | =head1 HOMEPAGE | ||
| 119 | |||
| 120 | Please visit the project's homepage at L<https://metacpan.org/release/TableData-Games-Cards-Troika>. | ||
| 121 | |||
| 122 | =head1 SOURCE | ||
| 123 | |||
| 124 | Source repository is at L<https://github.com/perlancar/perl-TableData-Games-Cards-Troika>. | ||
| 125 | |||
| 126 | =head1 SEE ALSO | ||
| 127 | |||
| 128 | Website of publisher. L<https://www.engaginc.com/> . | ||
| 129 | |||
| 130 | Homepage for the game. L<https://www.engaginc.com/products/anak-bos-troika/> . | ||
| 131 | |||
| 132 | Some additional materials for the game (instruction, logo, box mockup). L<https://github.com/berdikaritc/engaginc-productinfo-troika> . | ||
| 133 | |||
| 134 | =head1 AUTHOR | ||
| 135 | |||
| 136 | perlancar <perlancar@cpan.org> | ||
| 137 | |||
| 138 | =head1 CONTRIBUTOR | ||
| 139 | |||
| 140 | =for stopwords perlancar | ||
| 141 | |||
| 142 | perlancar <perlancar@gmail.com> | ||
| 143 | |||
| 144 | =head1 CONTRIBUTING | ||
| 145 | |||
| 146 | |||
| 147 | To contribute, you can send patches by email/via RT, or send pull requests on | ||
| 148 | GitHub. | ||
| 149 | |||
| 150 | Most of the time, you don't need to build the distribution yourself. You can | ||
| 151 | simply modify the code, then test via: | ||
| 152 | |||
| 153 | % prove -l | ||
| 154 | |||
| 155 | If you want to build the distribution (e.g. to try to install it locally on your | ||
| 156 | system), you can install L<Dist::Zilla>, | ||
| 157 | L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, | ||
| 158 | L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other | ||
| 159 | Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond | ||
| 160 | that are considered a bug and can be reported to me. | ||
| 161 | |||
| 162 | =head1 COPYRIGHT AND LICENSE | ||
| 163 | |||
| 164 | This software is copyright (c) 2026 by perlancar <perlancar@cpan.org>. | ||
| 165 | |||
| 166 | This is free software; you can redistribute it and/or modify it under | ||
| 167 | the same terms as the Perl 5 programming language system itself. | ||
| 168 | |||
| 169 | =head1 BUGS | ||
| 170 | |||
| 171 | Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=TableData-Games-Cards-Troika> | ||
| 172 | |||
| 173 | When submitting a bug or request, please include a test-file or a | ||
| 174 | patch to an existing test-file that illustrates the bug or desired | ||
| 175 | feature. | ||
| 176 | |||
| 177 | =cut | ||
| 178 | |||
| 179 | __DATA__ | ||