App-ZodiacUtils

 view release on metacpan or  search on metacpan

script/chinese-zodiac-of  view on Meta::CPAN

#
#If this is set, will render text table using L<Text::Table::Any> (with
#C<backend> set to the value of this environment variable) instead of the default
#L<Text::Table::Tiny>. This is useful if you want to output text table in a
#different format, for example to generate Org tables (make sure
#L<Text::Table::Org> backend is already installed):
#
# % FORMAT_PRETTY_TABLE_BACKEND=Text::Table::Org lcpan rdeps Getopt::Lucid
#
#=head2 FORMAT_PRETTY_TABLE_COLUMN_ORDERS => array (json)
#
#Set the default of C<table_column_orders> in C<format_options> in result
#metadata, similar to what's implemented in L<Perinci::Result::Format> and
#L<Data::Format::Pretty::Console>.
#
#=head2 COLOR => bool
#
#=head1 HOMEPAGE
#
#Please visit the project's homepage at L<https://metacpan.org/release/Perinci-Result-Format-Lite>.
#
#=head1 SOURCE
#
#Source repository is at L<https://github.com/perlancar/perl-Perinci-Result-Format-Lite>.
#
#=head1 BUGS
#
#Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Result-Format-Lite>
#
#When submitting a bug or request, please include a test-file or a
#patch to an existing test-file that illustrates the bug or desired
#feature.
#
#=head1 SEE ALSO
#
#L<Perinci::Result::Format>, a more heavyweight version of this module.
#
#L<Perinci::CmdLine::Lite> uses this module to format enveloped result.
#
#=head1 AUTHOR
#
#perlancar <perlancar@cpan.org>
#
#=head1 COPYRIGHT AND LICENSE
#
#This software is copyright (c) 2020, 2018, 2017, 2016, 2015 by perlancar@cpan.org.
#
#This is free software; you can redistribute it and/or modify it under
#the same terms as the Perl 5 programming language system itself.
#
#=cut
### Text/Table/Tiny.pm ###
#package Text::Table::Tiny;
#$Text::Table::Tiny::VERSION = '1.00';
#use 5.010;
#use strict;
#use warnings;
#use utf8;
#use parent 'Exporter';
#use Carp         qw/ croak /;
#use Ref::Util    qw/ is_arrayref is_ref /;
#our @EXPORT_OK = qw/ generate_table /;
#
## Legacy package globals, that can be used to customise the look.
## These are only used in the "classic" style.
## I wish I could drop them, but I don't want to break anyone's code.
#our $COLUMN_SEPARATOR     = '|';
#our $ROW_SEPARATOR        = '-';
#our $CORNER_MARKER        = '+';
#our $HEADER_ROW_SEPARATOR = '=';
#our $HEADER_CORNER_MARKER = 'O';
#
#my %charsets = (
#    classic => { TLC => '+', TT => '+', TRC => '+', HR => '-', VR => '|', FHR => '=', LT => '+', RT => '+', FLT => 'O', FRT => 'O', HC => '+', FHC => 'O', BLC => '+', BT => '+', BRC => '+' },
#    boxrule => { TLC => '┌', TT => '┬', TRC => '┐', HR => '─', VR => '│', FHR => '═', LT => '├', RT => '┤', FLT => '╞', FRT => '╡', HC => '┼', FHC => '╪', BLC => '└', BT => '┴', B...
#    norule  => { TLC => ' ', TT => ' ', TRC => ' ', HR => ' ', VR => ' ', FHR => ' ', LT => ' ', RT => ' ', FLT => ' ', FRT => ' ', HC => ' ', FHC => ' ', BLC => ' ', BT => ' ', BRC => ' ' },
#);
#
#sub generate_table
#{
#    my %param   = @_;
#    my $rows    = $param{rows} or croak "you must pass the 'rows' argument!";
#    my @rows    = @$rows;
#    my @widths  = _calculate_widths($rows);
#
#    $param{style}  //= 'classic';
#
#    $param{indent} //= '';
#    $param{indent} = ' ' x $param{indent} if $param{indent} =~ /^[0-9]+$/;
#
#    my $style   = $param{style};
#    croak "unknown style '$style'" if not exists($charsets{ $style });
#    my $char    = $charsets{$style};
#
#    if ($style eq 'classic') {
#        $char->{TLC} = $char->{TRC} = $char->{TT} = $char->{LT} = $char->{RT} = $char->{HC} = $char->{BLC} = $char->{BT} = $char->{BRC} = $CORNER_MARKER;
#        $char->{HR}  = $ROW_SEPARATOR;
#        $char->{VR}  = $COLUMN_SEPARATOR;
#        $char->{FLT} = $char->{FRT} = $char->{FHC} = $HEADER_CORNER_MARKER;
#        $char->{FHR} = $HEADER_ROW_SEPARATOR;
#    }
#
#    my $header;
#    my @align;
#    if (defined $param{align}) {
#        @align = is_arrayref($param{align})
#               ? @{ $param{align} }
#               : ($param{align}) x int(@widths)
#               ;
#    }
#    else {
#        @align = ('l') x int(@widths);
#    }
#
#    $header = shift @rows if $param{header_row};
#
#    my $table = _top_border(\%param, \@widths, $char)
#                ._header_row(\%param, $header, \@widths, \@align, $char)
#                ._header_rule(\%param, \@widths, $char)
#                ._body(\%param, \@rows, \@widths, \@align, $char)
#                ._bottom_border(\%param, \@widths, $char);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.994 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )