BorderStyles-Standard
view release on metacpan or search on metacpan
lib/BorderStyle/UTF8/Brick.pm view on Meta::CPAN
package BorderStyle::UTF8::Brick;
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, bold on bottom right to give illusion of depth',
utf8 => 1,
);
1;
# ABSTRACT: Single-line, bold on bottom right to give illusion of depth
__END__
=pod
=encoding UTF-8
=head1 NAME
BorderStyle::UTF8::Brick - Single-line, bold on bottom right to give illusion of depth
=head1 VERSION
This document describes version 0.014 of BorderStyle::UTF8::Brick (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::Brick");
$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::Brick");
Sample output:
ââââââââââââââ¬ââââââââââââââ¬ââââââââââââââ
â ColumName1 â ColumnNameB â ColumnNameC â
ââââââââââââââ¼ââââââââââââââ¼ââââââââââââââ¨
â row1A â row1B â row1C â
ââââââââââââââ¼ââââââââââââââ¼ââââââââââââââ¨
â row2A â row2B â row2C â
ââââââââââââââ¼ââââââââââââââ¼ââââââââââââââ¨
â row3A â row3B â row3C â
ââââââââââââââ·ââââââââââââââ·ââââââââââââââ
( run in 1.950 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )