The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!perl

our $DATE = '2015-01-03'; # DATE
our $VERSION = '0.39'; # VERSION

use 5.010;
use strict;
use warnings;

use Text::ANSITable;

binmode(STDOUT, ":utf8");

my $t = Text::ANSITable->new;

if ($ARGV[0]) {
    $t->border_style($ARGV[0]);
}

my $all_bs = $t->list_border_styles(1);

$t->columns(['Name', 'Summary', 'box_chars?', 'utf8?']);
my $utf8; # we sort by not utf8 and then utf8, just to demonstrate add_row_separator
for my $name (sort {($all_bs->{$a}{utf8} ? 1:0)<=>($all_bs->{$b}{utf8} ? 1:0) || $a cmp $b} keys %$all_bs) {
    my $bs = $all_bs->{$name};
    my $selected = $name eq $t->border_style->{name};
    $t->add_row(
        [$name . ($selected ? " (*)" : ""), $bs->{summary}, $bs->{box_chars} ? 1:0, $bs->{utf8} ? 1:0],
        {fgcolor=>$selected && $t->use_color ? "aaaa00" : undef});

    if (!$utf8 && $bs->{utf8}) {
        $t->add_row_separator;
        $utf8++;
    }
}

say "Tip: you can run me with border style name as argument to try it out.";
print $t->draw;

#use Data::Dump; dd $t->{_row_separators}; dd $t->{_draw}{frow_separators};

# ABSTRACT: List available border styles for Text::ANSITable
# PODNAME: ansitable-list-border-styles

__END__

=pod

=encoding UTF-8

=head1 NAME

ansitable-list-border-styles - List available border styles for Text::ANSITable

=head1 VERSION

This document describes version 0.39 of ansitable-list-border-styles (from Perl distribution Text-ANSITable), released on 2015-01-03.

=head1 SYNOPSIS

 % ansitable-list-border-styles

Sample output:

 Tip: you can run me with border style name as argument to try it out.
 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┒
 │ Name                       Summary                                                              box_chars?   utf8? ┃
 │                                                                                                                    ┃
 │ Default::none_ascii        No border                                                                ✕          ✕   ┃
 │ Default::none_boxchar      No border                                                                ✓          ✕   ┃
 │ Default::single_ascii      Single                                                                   ✕          ✕   ┃
 │ Default::single_boxchar    Single                                                                   ✓          ✕   ┃
 │ Default::singleh_ascii     Single, horizontal only                                                  ✕          ✕   ┃
 │ Default::singleh_boxchar   Single, horizontal only                                                  ✓          ✕   ┃
 │ Default::singlei_ascii     Single, inner only (like in psql command-line client)                    ✕          ✕   ┃
 │ Default::singlei_boxchar   Single, inner only (like in psql command-line client)                    ✓          ✕   ┃
 │ Default::singleo_ascii     Single, outer only                                                       ✕          ✕   ┃
 │ Default::singleo_boxchar   Single, outer only                                                       ✓          ✕   ┃
 │ Default::singlev_ascii     Single border, only vertical                                             ✕          ✕   ┃
 │ Default::singlev_boxchar   Single, vertical only                                                    ✓          ✕   ┃
 │ Default::space_ascii       Space as border                                                          ✕          ✕   ┃
 │ Default::space_boxchar     Space as border                                                          ✓          ✕   ┃
 │ Default::spacei_ascii      Space, inner-only                                                        ✕          ✕   ┃
 │ Default::spacei_boxchar    Space, inner-only                                                        ✓          ✕   ┃
 │ Demo::demo_custom_char     Demoes coderef in chars                                                  ✕          ✕   ┃
 │ Default::bold              Bold                                                                     ✕          ✓   ┃
 ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┨
 │ Default::brick             Single, bold on bottom right to give illusion of depth                   ✕          ✓   ┃
 │ Default::bricko (*)        Single, outer only, bold on bottom right to give illusion of depth       ✕          ✓   ┃
 │ Default::csingle           Curved single                                                            ✕          ✓   ┃
 │ Default::double            Double                                                                   ✕          ✓   ┃
 │ Default::none_utf8         No border                                                                ✕          ✓   ┃
 │ Default::single_utf8       Single                                                                   ✕          ✓   ┃
 │ Default::singleh_utf8      Single, horizontal only                                                  ✕          ✓   ┃
 │ Default::singlei_utf8      Single, inner only (like in psql command-line client)                    ✕          ✓   ┃
 │ Default::singleo_utf8      Single, outer only                                                       ✕          ✓   ┃
 │ Default::singlev_utf8      Single, vertical only                                                    ✕          ✓   ┃
 │ Default::space_utf8        Space as border                                                          ✕          ✓   ┃
 │ Default::spacei_utf8       Space, inner-only                                                        ✕          ✓   ┃
 │ Extra::dash2               Dash 2                                                                   ✕          ✓   ┃
 │ Extra::dash3               Dash 3                                                                   ✕          ✓   ┃
 │ Extra::hboldh_dsingle      Horizontally-bold for header, single for data                            ✕          ✓   ┃
 │ Extra::hdoubleh_dsingle    Horizontally-double for header, single for data                          ✕          ✓   ┃
 ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Text-ANSITable>.

=head1 SOURCE

Source repository is at L<https://github.com/sharyanto/perl-Text-ANSITable>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Text-ANSITable>

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 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 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