NAME

Text::SlackEmoji - data for mapping Slack :emoji_strings: into Unicode text

VERSION

version 0.010

SYNOPSIS

use Text::SlackEmoji;

my $emoji = Text::SlackEmoji->emoji_map;

$slack_message =~ s!:([-+a-z0-9_]+):!$emoji->{$1} // ":$1:"!ge;

DESCRIPTION

This library is basically just a container around a hash mapping strings like "disappointed_relieved" to Unicode text like 😥 .

PERL VERSION

This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.)

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

METHODS

load_emoji

This method reloads the emoji map from disk, allowing the mapping to be updated in (say) your IRC client without forcing the reload of the module.

emoji_map

This method takes no arguments and returns a hashref mapping Slack emoji names to Unicode strings. The strings may be more than one character long.

SECRET ORIGINS

I made the first version of this lookup to power a little irssi plugin so that when using the Slack IRC gateway, I'd see the same emoji as the people using the Slack app, at least when possible.

AUTHOR

Ricardo Signes <cpan@semiotic.systems>

CONTRIBUTORS

  • Ricardo Signes <rjbs@cpan.org>

  • Ricardo Signes <rjbs@semiotic.systems>

  • Rob N ★ <robn@robn.io>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.