Skip to content

Instantly share code, notes, and snippets.

@sharifulin
Created November 7, 2010 14:07
Show Gist options
  • Save sharifulin/666140 to your computer and use it in GitHub Desktop.
Save sharifulin/666140 to your computer and use it in GitHub Desktop.
Small bug: inflate + utf8
#!/usr/bin/env perl
use Mojolicious::Lite;
use utf8;
get '/' => 'index';
get '/:groovy' => sub {
my $self = shift;
$self->render(text => $self->param('groovy'), layout => 'funky');
};
app->start;
__DATA__
@@ index.html.ep
% layout 'funky';
Привет!
@@ layouts/funky.html.ep
<!doctype html><html>
<head><title>Funky!</title></head>
<body><%== content %></body>
</html>
$ perl -Ilib test_inflate.pl inflate
[mkdir] templates/layouts
[write] templates/layouts/funky.html.ep
[exist] templates
Wide character in syswrite at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/IO/Handle.pm line 461, <DATA> line 24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment