—#!perl
use
strict;
use
warnings;
our
$AUTHORITY
=
'cpan:PERLANCAR'
;
# AUTHORITY
our
$DATE
=
'2022-03-08'
;
# DATE
our
$DIST
=
'App-TermAttrUtils'
;
# DIST
our
$VERSION
=
'0.007'
;
# VERSION
package
MyApp;
use
Moo;
use
Data::Dump;
sub
run {
my
$self
=
shift
;
dd {
use_utf8
=>
$self
->use_utf8,
use_box_chars
=>
$self
->use_box_chars,
interactive
=>
$self
->interactive,
use_color
=>
$self
->use_color,
color_depth
=>
$self
->color_depth,
term_width
=>
$self
->term_width,
term_height
=>
$self
->term_height,
_termattr_debug_info
=>
$self
->{_termattr_debug_info},
};
}
package
main;
MyApp->new->run;
# ABSTRACT: Show terminal attributes (from Term::App::Role::Attrs)
# PODNAME: term-attrs
__END__
=pod
=encoding UTF-8
=head1 NAME
term-attrs - Show terminal attributes (from Term::App::Role::Attrs)
=head1 VERSION
This document describes version 0.007 of MyApp (from Perl distribution App-TermAttrUtils), released on 2022-03-08.
=head1 SYNOPSIS
% term-attrs
Sample result:
{
_termattr_debug_info => {
color_depth_from => "detect_terminal",
interactive_from => "-t STDOUT",
term_height_from => "term_size",
term_width_from => "term_size",
use_box_chars_from => "detect_terminal",
use_color_from => "interactive + color_deth",
use_utf8_from => "detect_terminal + LANG/LANGUAGE env must include \"utf8\"",
},
color_depth => 16777216,
interactive => 1,
term_height => 45,
term_width => 192,
use_box_chars => 1,
use_color => 1,
use_utf8 => 1,
}
=head1 DESCRIPTION
This is a simple CLI for L<Term::App::Role::Attrs>. It shows what values are
provided for applications that use that role.
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-TermAttrUtils>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-TermAttrUtils>.
=head1 SEE ALSO
L<Term::App::Role::Attrs>
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.
Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your
system), you can install L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required
beyond that are considered a bug and can be reported to me.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2022, 2020, 2019 by perlancar <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.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-TermAttrUtils>
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.
=cut