Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Apache + ssi emulation for app::dir plack.

  • Loading branch information...
commit bb02592adcdfcc59b30fcbf813a52719470cbff6 1 parent a46afa0
Ashley Pond V authored

Showing 2 changed files with 16 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  bin/anyevent-twitter-stream
  2. +14 0 bin/plapacke.psgi
3  bin/anyevent-twitter-stream
@@ -6,6 +6,7 @@ use Term::ReadKey;
6 6 use utf8::all;
7 7 use Encode;
8 8 use Growl::Any;
  9 +use HTML::Entities;
9 10
10 11 # $ENV{ANYEVENT_TWITTER_STREAM_SSL} = 1;
11 12
@@ -45,7 +46,7 @@ $listener = AnyEvent::Twitter::Stream->new(
45 46 $growl->notify(
46 47 "tweet",
47 48 $tweet->{user}{screen_name},
48   - $tweet->{text},
  49 + decode_entities($tweet->{text}),
49 50 $tweet->{user}{profile_image_url},
50 51 );
51 52 },
14 bin/plapacke.psgi
... ... @@ -0,0 +1,14 @@
  1 +#!/usr/bin/env perl
  2 +use strictures;
  3 +use Plack::Builder;
  4 +use Plack::App::Directory;
  5 +use Cwd;
  6 +
  7 +my $app = Plack::App::Directory->new({ root => cwd() })->to_app;
  8 +
  9 +builder {
  10 + enable "Plack::Middleware::SSI";
  11 + $app;
  12 +};
  13 +
  14 +__END__

0 comments on commit bb02592

Please sign in to comment.
Something went wrong with that request. Please try again.