Acme-TextLayout
view release on metacpan or search on metacpan
lib/Acme/TextLayout.pm view on Meta::CPAN
./_widest(\@text);
}
else {
return undef;
}
./_whats_in_there($text);
./_widest($text);
$.textRef = $text;
map {
return undef unless length($_) == $.widest;
} @{$.textRef};
my %Ranges;
my %chars = %.chars;
map {
my $C = $_;
my @d = ./range($C);
$Ranges{$C} = \@d;
} keys(%chars);
lib/Acme/TextLayout.pm view on Meta::CPAN
$ok = 0 if $n > 1;
} @chars;
}
return $ok ? 0 : 1;
}
sub _widest {
my ($self, $textRef) = @_;
my @text = @$textRef;
my $widest = length($text[0]);
map {
my $len = length($_);
$widest = $len if $len > $widest;
} @text;
$.widest = $widest;
}
sub _height {
my ($self, $textRef) = @_;
my @text = @$textRef;
return scalar(@text);
}
( run in 0.774 second using v1.01-cache-2.11-cpan-65fba6d93b7 )