f33b224d10df602e9b1583e3790974f28c50f739
[sheet.git] / Shiar_Sheet / KeySigns.pm
1 package Shiar_Sheet::KeySigns;
2
3 use utf8;
4 use strict;
5 use warnings;
6
7 our $VERSION = 'v1.01';
8
9 sub import {
10         my $class = shift;
11
12         my %sign = (
13                 -ascii => 0,
14                 charset=> 'utf-8',
15                 arg    => '·',  # described as 'dot'
16                 args   => '⁚',
17                 argi   => '′',
18                 argm   => '↕',
19                 motion => '↕',
20                 alias  => '»',
21                 up     => '▲',
22                 right  => '▶',
23                 down   => '▼',
24                 left   => '◀',
25                 sep    => '•',
26                 _      => '<wbr>' || "\x{200b}",  # unofficial html, correct ZWNJ character might appear as placeholder
27         );
28
29         my ($parent) = caller;
30         eval '*'.$parent.'::sign = \%sign';
31 }
32
33 1;
34
35 __END__
36
37 =head1 NAME
38
39 Shiar_Sheet::KeySigns - Common Unicode characters in user-preferred charset
40
41 =head1 SYNOPSIS
42
43         use Shiar_Sheet::KeySigns;
44         print "$sign{alias} some$sign{_}thing";  # » some<wbr>thing
45
46 =head1 AUTHOR
47
48 Mischa POSLAWSKY <perl@shiar.org>
49
50 =head1 LICENSE
51
52 Copyright. All rights reserved.
53