Unicode::Block::Ascii - Ascii output of unicode block.
use Unicode::Block::Ascii; my $obj = Unicode::Block::Ascii->new(%parameters); my $output = $obj->get; my $item = $obj->next;
new(%parameters)
Constructor.
char_from
Character from. Default value is '0000'.
char_to
Character to. Default value is '007f'.
title
Title of block. Default value is undef.
get()
Get output. Return string with ascii table of Unicode::Block object.
next()
Get next character. Returns Unicode::Block::Item object for character, if character exists. Returns undef, if character doesn't exist.
new(): From Class::Utils::set_params_pub(): Unknown parameter '%s'. get(): Long title.
# Pragmas. use strict; use warnings; # Modules. use Encode qw(encode_utf8); use Unicode::Block::Ascii; use Unicode::Block::List; # Arguments. if (@ARGV < 1) { print STDERR "Usage: $0 block_name\n"; exit 1; } my $block_name = $ARGV[0]; # List object. my $obj = Unicode::Block::List->new; # Get Unicode::Block for block name. my $block = $obj->block($block_name); # Get ASCII object. my $block_ascii = Unicode::Block::Ascii->new(%{$block}); # Print to output. print encode_utf8($block_ascii->get)."\n"; # Output: # Usage: /tmp/o1NG0vm_Wf block_name # Output with 'Block Elements' argument: # ┌────────────────────────────────────────┐ # │ Block Elements │ # ├────────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤ # │ │0│1│2│3│4│5│6│7│8│9│A│B│C│D│E│F│ # ├────────┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ # │ U+258x │▀│▁│▂│▃│▄│▅│▆│▇│█│▉│▊│▋│▌│▍│▎│▏│ # ├────────┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ # │ U+259x │▐│░│▒│▓│▔│▕│▖│▗│▘│▙│▚│▛│▜│▝│▞│▟│ # └────────┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
Error::Pure, Readonly, Text::UnicodeBox, Text::UnicodeBox::Control, Unicode::Block.
https://github.com/tupinek/Unicode-Block-Ascii
Michal Špaček mailto:skim@cpan.org
http://skim.cz
BSD license.
0.01
To install Unicode::Block::Ascii, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unicode::Block::Ascii
CPAN shell
perl -MCPAN -e shell install Unicode::Block::Ascii
For more information on module installation, please visit the detailed CPAN module installation guide.