Plack::Middleware::UnicodePictogramFallback::TypeCast - Unicode pictogram fallback to HTML
This document describes Plack::Middleware::UnicodePictogramFallback::TypeCast version 0.02.
use Plack::Middleware::UnicodePictogramFallback::TypeCast; use Plack::Builder; my $app = sub { [200, ['Content-Type' => 'text/html', 'Content-Length' => 16], ["<body>\xE2\x98\x80</body>"]]; }; builder { enable 'UnicodePictogramFallback::TypeCast', template => '<img src="/img/emoticon/%s.gif" />'; $app; }; # returns <body><img src="/img/emoticon/sun.gif /></body>
Unicode pictogram fallback to HTML
Content-Length header will be removed if content is filtered.
You can use this in conjunction with Plack::Middleware::ContentLength.
Perl 5.8.1 or later.
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
perl
Masayuki Matsuki <y.songmu@gmail.com>
Copyright (c) 2013, Masayuki Matsuki. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Plack::Middleware::UnicodePictogramFallback::TypeCast, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::UnicodePictogramFallback::TypeCast
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::UnicodePictogramFallback::TypeCast
For more information on module installation, please visit the detailed CPAN module installation guide.