App-wordlist

 view release on metacpan or  search on metacpan

script/wordlist  view on Meta::CPAN

#                } elsif ($fmt_name eq 'boolstr') {
#                    $row->[$j] = $row->[$j] ? "yes" : "no";
#                } elsif ($fmt_name eq 'filesize') {
#                    require Format::Human::Bytes;
#                    $row->[$j] = Format::Human::Bytes::base2($row->[$j], 0);
#                } elsif ($fmt_name eq 'sci2dec') {
#                    if ($row->[$j] =~ /\A(?:[+-]?)(?:\d+\.|\d*\.(\d+))[eE]([+-]?\d+)\z/) {
#                        my $n = length($1 || "") - $2; $n = 0 if $n < 0;
#                        $row->[$j] = sprintf("%.${n}f", $row->[$j]);
#                    }
#                } elsif ($fmt_name eq 'percent') {
#                    my $fmt = $fmt_opts->{sprintf} // '%.2f%%';
#                    $row->[$j] = sprintf($fmt, $row->[$j] * 100);
#                } elsif ($fmt_name eq 'number') {
#                    require Number::Format::BigFloat;
#                    $row->[$j] = Number::Format::BigFloat::format_number(
#                        $row->[$j], {
#                            thousands_sep  => $fmt_opts->{thousands_sep} // ',',
#                            decimal_point  => $fmt_opts->{decimal_point} // '.',
#                            decimal_digits => $fmt_opts->{precision} // 0,
#                            # XXX decimal_fill

script/wordlist  view on Meta::CPAN

#                    for my $i (0..$#{$data}) {
#                        my $row = $data->[$i];
#                        if (@$row > $colidx) {
#                            my $cell = $row->[$colidx];
#                            if ($header_row && $i == 0) {
#                                my $w = length($cell);
#                                push @w_bd, 0;
#                                push @w_bd, 0;
#                                push @w_ad, 0;
#                            } elsif ($cell =~ /\A([+-]?\d+)(\.?)(\d*)[%]?\z/) {
#                                # decimal notation number (with optional percent sign). TODO: allow arbitraty units after number, e.g. ml, mcg, etc? but should we align the unit too?
#                                push @w_bd, length($1);
#                                push @w_d , length($2);
#                                push @w_ad, length($3);
#                            } elsif ($cell =~ /\A([+-]?\d+\.?\d*)([eE])([+-]?\d+)\z/) {
#                                # scientific notation number
#                                push @w_bd, length($1);
#                                push @w_d , length($2);
#                                push @w_ad, length($3);
#                            } else {
#                                # not a number

script/wordlist  view on Meta::CPAN

#of the same element as defined in C<table.fields>). Used when formatting result
#as text table. Will show this along with field name/label. For example if a
#field's unit is defined as `cm` and field name is `length`, then the field
#header will show as `length (cm)`.
#
#=item * table.field_formats
#
#Array of str. Define format for each field (each element correspond to the field
#of the same element as defined in C<table.fields>). Used when formatting result
#as text table. Known formats: `iso8601_datetime`, `iso8601_date`, `datetime`,
#`date`, `boolstr`, `filesize`, `sci2dec`, `percent`, `number`.
#
#=item * table.field_format_code
#
#Coderef. Will be called with argument of field name. Expected to return format
#name (see C<table.field_formats>). Used when formatting result as text table.
#This option can be used when you want to dynamically determine a suitable format
#based on field name.
#
#=item * table.default_field_format
#



( run in 0.340 second using v1.01-cache-2.11-cpan-709fd43a63f )