Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

docs

  • Loading branch information...
commit 39d52cef3a487b38512f498f08c9807d47c425f4 1 parent a5250dd
motemen authored

Showing 1 changed file with 8 additions and 9 deletions. Show diff stats Hide diff stats

  1. +8 9 lib/App/htmlcat.pm
17 lib/App/htmlcat.pm
@@ -54,7 +54,7 @@ sub _on_read_cb {
54 54 sub _broadcast {
55 55 my ($self, $data) = @_;
56 56
57   - open my $fh, '<', \$self->{in}->rbuf;
  57 + open my $fh, '<', \$data;
58 58 while (defined (my $line = <$fh>)) {
59 59 $line = decode_utf8 $line;
60 60 foreach my $client (values %{ $self->{clients} }){
@@ -149,6 +149,7 @@ sub run {
149 149 $runner->run;
150 150 }
151 151
  152 +# from Test::TCP
152 153 sub _empty_port {
153 154 my $port = $ENV{HTTPCAT_PORT} || 45192 + int(rand() * 1000);
154 155
@@ -226,17 +227,17 @@ App::htmlcat - stdin to your browser
226 227
227 228 =over 4
228 229
229   -=item new
  230 +=item my $htmlcat = App::htmlcat->new(@ARGV)
230 231
231   -=item on_read
  232 +Creates an instance. Currently only C<--exec> option is meaningful.
232 233
233   -=item broadcast
  234 +=item $htmlcat->as_psgi
234 235
235   -=item push_line
  236 +Returns the htmlcat PSGI app.
236 237
237   -=item as_psgi
  238 +=item $htmlcat->run
238 239
239   -=item run
  240 +Does plackup internally and runs htmlcat.
240 241
241 242 =item empty_port
242 243
@@ -246,8 +247,6 @@ App::htmlcat - stdin to your browser
246 247
247 248 motemen E<lt>motemen@gmail.comE<gt>
248 249
249   -=head1 SEE ALSO
250   -
251 250 =head1 LICENSE
252 251
253 252 This library is free software; you can redistribute it and/or modify

0 comments on commit 39d52ce

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