Text::Orientation - Text Rotator
use Text::Orientation; # OO $rot = Text::Orientation->new( TEXT => "Rotate me!" ); print $rot->mirror('horizontal'); print $rot->rotate(+1); # PerlIO layer use Text::Orientation method => 'mirror', param => 'horizontal', charset=> 'Big5'; binmode(STDOUT, ":via(Text::Orientation)") or die; print BLAH BLAH BLAH ...
This module enables one to rotate text. For example, Chinese can be written downwards or leftwards, but it is usually not convenient to do so on one's computer. With Text::Orientation one can easily deal with this problem.
PerlIO layer interface is also provided for easier coding.
$rot = Text::Orientation->new( TEXT => text or text's ref, CHARSET => blah);
Constructor. As for TEXT, either a string or a reference to an array of text will do. Please specify CHARSET If the input text is encoded in multibyte character set.
Changes the encoding of the text. If not set, text is treated as encoded in single byte.
Changes the text to rotate.
Transposes text along the diagonal.
Transposes text along the antidiagonal.
Generates the mirrored image of input string in two ways: 'vertical' or 'horizontal'.
Rotates the text. The parameter is an integer. Positive is for clockwise rotation, and negative for counterclockwise. E.g. -3 for 270-degree counterclockwise rotation
xern <xern@cpan.org>
String::Multibyte
Released under The Artistic License
To install Text::Orientation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Orientation
CPAN shell
perl -MCPAN -e shell install Text::Orientation
For more information on module installation, please visit the detailed CPAN module installation guide.