App::UnANSI - Remove ANSI coloring from output or files
version 0.003
use App::UnANSI; my $unansi = App::UnANSI->new(); my $some_line = get_line_with_coloring(); $unansi->remove_ansi_colors($some_line); # $some_line is now clean
This is the underlying implementation of unansi.
This is the documentation of the command implementation. You are most likely looking for the command documentation itself: unansi.
Can be set on instantiation, returns a list of files to process.
my @files_to_process = $unansi->files;
Creates a new instance. You can provide files to process.
files
my $unansi = App::UnANSI->new(); # or my $unansi = App::UnANSI->new( 'files' => [ 'foo.txt', 'bar.txt' ], );
Creates a new instance using options from the command line. This is what the CLI uses.
Processes either the files or the input from the command line. In both cases it prints to the screen. This might change for files in the future.
The actual code that removes the ANSI coloring from a string. It alters the string it receives, for speed purposes.
my $line = '...'; $unansi->remove_ansi_colors($line);
Sawyer X
This software is Copyright (c) 2016 by Sawyer X.
This is free software, licensed under:
The MIT (X11) License
To install App::UnANSI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::UnANSI
CPAN shell
perl -MCPAN -e shell install App::UnANSI
For more information on module installation, please visit the detailed CPAN module installation guide.