BorderStyles-Standard

 view release on metacpan or  search on metacpan

lib/BorderStyle/UTF8/BrickOuterOnly.pm  view on Meta::CPAN

package BorderStyle::UTF8::BrickOuterOnly;

use strict;
use warnings;
use utf8;

use Role::Tiny::With;
with 'BorderStyleRole::Source::ASCIIArt';

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2022-02-20'; # DATE
our $DIST = 'BorderStyles-Standard'; # DIST
our $VERSION = '0.014'; # VERSION

our $PICTURE = <<'_';
┌───────────────┒'
│ .....   .   . ┃'
│ .....         ┃'
│ .....   .   . ┃'
│ .....         ┃'
│ .....   ..... ┃'
│         ..... ┃'
│ .   .   ..... ┃'
┕━━━━━━━━━━━━━━━┛'
_

our %BORDER = (
    v => 3,
    summary => 'Single-line (outer only), bold on bottom right to give illusion of depth',
    utf8 => 1,
);

1;
# ABSTRACT: Single-line (outer only), bold on bottom right to give illusion of depth

__END__

=pod

=encoding UTF-8

=head1 NAME

BorderStyle::UTF8::BrickOuterOnly - Single-line (outer only), bold on bottom right to give illusion of depth

=head1 VERSION

This document describes version 0.014 of BorderStyle::UTF8::BrickOuterOnly (from Perl distribution BorderStyles-Standard), released on 2022-02-20.

=head1 SYNOPSIS

To use with L<Text::ANSITable>:

 use Text::ANSITable;
 my $rows =
   [
     ["ColumName1", "ColumnNameB", "ColumnNameC"],
     ["row1A", "row1B", "row1C"],
     ["row2A", "row2B", "row2C"],
     ["row3A", "row3B", "row3C"],
   ];
 my $t = Text::ANSITable->new;
 $t->border_style("UTF8::BrickOuterOnly");
 $t->columns($rows->[0]);
 $t->add_row($rows->[$_]) for 1 .. $#{ $rows };
 print $t->draw;


Sample output:

 ┌────────────────────────────────────────┒
 │ ColumName1   ColumnNameB   ColumnNameC ┃
 │                                        ┃
 │ row1A        row1B         row1C       ┃
 │ row2A        row2B         row2C       ┃
 │ row3A        row3B         row3C       ┃
 ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

To use with L<Text::Table::More>:

 use Text::Table::More qw/generate_table/;
 my $rows =
   [
     ["ColumName1", "ColumnNameB", "ColumnNameC"],
     ["row1A", "row1B", "row1C"],
     ["row2A", "row2B", "row2C"],
     ["row3A", "row3B", "row3C"],
   ];
 generate_table(rows=>$rows, header_row=>1, separate_rows=>1, border_style=>"UTF8::BrickOuterOnly");


Sample output:

 ┌────────────────────────────────────────┒
   ColumName1   ColumnNameB   ColumnNameC ┃
 │                                        ┃
   row1A        row1B         row1C       ┃
 │                                        ┃
   row2A        row2B         row2C       ┃
 │                                        ┃
   row3A        row3B         row3C       ┃
 ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 



( run in 0.679 second using v1.01-cache-2.11-cpan-39bf76dae61 )