/usr/share/perl5/App/Asciio/Ascii.pm is in asciio 1.02.71-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | package App::Asciio;
$|++ ;
use strict;
use warnings;
#-----------------------------------------------------------------------------
sub transform_elements_to_ascii_buffer
{
my ($self, @elements) = @_ ;
return(join("\n", $self->transform_elements_to_ascii_array(@elements)) . "\n") ;
}
#-----------------------------------------------------------------------------
sub transform_elements_to_ascii_array
{
my ($self, @elements) = @_ ;
@elements = @{$self->{ELEMENTS}} unless @elements ;
my @lines ;
for my $element (@elements)
{
for my $strip ($element->get_mask_and_element_stripes())
{
my $line_index = 0 ;
for my $sub_strip (split("\n", $strip->{TEXT}))
{
my $character_index = 0 ;
for my $character (split '', $sub_strip)
{
my $x = $element->{X} + $strip->{X_OFFSET} + $character_index ;
my $y = $element->{Y} + $strip->{Y_OFFSET} + $line_index ;
$lines[$y][$x] = $character if ($x >= 0 && $y >= 0) ;
$character_index ++ ;
}
$line_index++ ;
}
}
}
my @ascii;
for my $line (@lines)
{
my $ascii_line = join('', map {defined $_ ? $_ : ' '} @{$line}) ;
push @ascii, $ascii_line;
}
return(@ascii) ;
}
#-----------------------------------------------------------------------------
1 ;
|