NAME

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

VERSION

version 0.006

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 😥 .

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 <rjbs@cpan.org>

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.