Permalink
Browse files

Apache + ssi emulation for app::dir plack.

  • Loading branch information...
1 parent a46afa0 commit bb02592adcdfcc59b30fcbf813a52719470cbff6 @pangyre committed Mar 24, 2012
Showing with 16 additions and 1 deletion.
  1. +2 −1 bin/anyevent-twitter-stream
  2. +14 −0 bin/plapacke.psgi
@@ -6,6 +6,7 @@ use Term::ReadKey;
use utf8::all;
use Encode;
use Growl::Any;
+use HTML::Entities;
# $ENV{ANYEVENT_TWITTER_STREAM_SSL} = 1;
@@ -45,7 +46,7 @@ $listener = AnyEvent::Twitter::Stream->new(
$growl->notify(
"tweet",
$tweet->{user}{screen_name},
- $tweet->{text},
+ decode_entities($tweet->{text}),
$tweet->{user}{profile_image_url},
);
},
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+use strictures;
+use Plack::Builder;
+use Plack::App::Directory;
+use Cwd;
+
+my $app = Plack::App::Directory->new({ root => cwd() })->to_app;
+
+builder {
+ enable "Plack::Middleware::SSI";
+ $app;
+};
+
+__END__

0 comments on commit bb02592

Please sign in to comment.