Skip to content

Commit

Permalink
Added warning and documentation about supported servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Grimes committed Feb 11, 2010
1 parent a4af66b commit cd598b8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions lib/Plack/Middleware/AutoRefresh.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ sub prepare_app {
sub call {
my ( $self, $env ) = @_;

carp "AutoRefresh middleware doesn't work if psgi.nonblocking is false.\n",
"Servers that are known to work: AnyEvent and Coro\n"
unless $env->{'psgi.nonblocking'};

# Client is looking for changed files
if ( $env->{PATH_INFO} =~ m{^/_plackAutoRefresh(?:/(\d+))?} ) {

Expand Down Expand Up @@ -176,10 +180,15 @@ Plack::Middleware::AutoRefresh - Reload pages in browsers when files are modifie
=head1 DESCRIPTION
Plack::Middleware::AutoRefresh is a middleware component that will reload
you web pages in your browser when changes are detected in the source
files. It should work with any modern browser that supports JavaScript and
multiple browsers simultaneously.
Plack::Middleware::AutoRefresh is a middleware component that will
reload you web pages in your browser when changes are detected in the
source files. It should work with any modern browser that supports
JavaScript and multiple browsers simultaneously.
At this time, this middleware will only work with backend servers that
set psgi.nonblocking to true. Servers that are known to work include
L<Plack::Server::AnyEvent> and L<Plack::Server::Coro>. You can force
a server with the C<-s> or C<--server> flag to C<plackup>.
=head1 CONFIGURATION
Expand Down

0 comments on commit cd598b8

Please sign in to comment.