NAME

App::GitHooks::Terminal - Information about the current terminal in which App::GitHook is running.

VERSION

Version 1.9.0

SYNOPSIS

        use App::GitHooks::Terminal;

        my $terminal = App::GitHooks::Terminal->new();
        my $get_encoding = $terminal->get_encoding();
        my $get_width = $terminal->get_width();
        my $is_interactive = $terminal->is_interactive();
        my $is_utf8 = $terminal->is_utf8();

METHODS

new()

Return a new App::GitHooks::Terminal object.

        my $terminal = App::GitHooks::Terminal->new();

get_encoding()

Determine the current terminal's encoding.

        my $get_encoding = $terminal->get_encoding();

get_width()

Get the width (in the number of characters) of the current terminal.

        my $get_width = $terminal->get_width();

is_interactive()

Determine whether the current terminal is interactive or not.

        my $is_interactive = $terminal->is_interactive();

is_utf8()

Determine if the current terminal supports utf-8.

        my $is_utf8 = $terminal->is_utf8();

Optionally, you can override the utf-8 support by passing an extra boolean argument:

        $terminal->is_utf8(1); # Force utf-8 output.
        $terminal->is_utf8(0); # Force non-utf-8 output.

BUGS

Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/App-GitHooks/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

        perldoc App::GitHooks::Terminal

You can also look for information at:

AUTHOR

Guillaume Aubert, <aubertg at cpan.org>.

COPYRIGHT & LICENSE

Copyright 2013-2017 Guillaume Aubert.

This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.