
Text::Emoticon::Yahoo - Emoticon filter of Yahoo! Messenger

use Text::Emoticon::Yahoo;
my $emoticon = Text::Emoticon::Yahoo->new(
imgbase => "http://example.com/emo",
);
my $text = "Yet Another Perl Hacker ;)";
print $emoticon->filter($text);
# it prints
# Yet Another Perl Hacker <img src="http://example.com/emo/3.gif" />

Text::Emoticon::Yahoo is a text filter that replaces text emoticons like ":)", ";P", etc. to the icons of Yahoo! Messenger, detailed in http://messenger.yahoo.com/emoticons.php

$emoticon = Text::Emoticon::Yahoo->new(
imgbase => "http://yourhost.example.com/images/emoticons",
xhtml => 1,
class => "emoticon",
);
Constructs new Text::Emoticon::Yahoo object. It accepts two options:
Base URL where icon gif files are located. It defaults to "http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons6/" (the Yahoo site), but I don't recommend that, as there's a possibility Yahoo! will ban your site.
Whether it uses XHTML style img tags. It defaults to 1.
CSS class used in img tags. It defaults to nothing.
$emoticon = Text::Emoticon::Yahoo->new(class => "emo");
will print:
<img src="blah.gif" class="emo" />
$filtered_text = $emoticon->filter($text);
Filters emoticons in text and returns img tagged text (HTML).


M. Blom <b10m@perlmonk.org<gt>
Text::Emoticon::MSN by Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
