Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs

  • Loading branch information...
commit 39d52cef3a487b38512f498f08c9807d47c425f4 1 parent a5250dd
@motemen authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 lib/App/htmlcat.pm
View
17 lib/App/htmlcat.pm
@@ -54,7 +54,7 @@ sub _on_read_cb {
sub _broadcast {
my ($self, $data) = @_;
- open my $fh, '<', \$self->{in}->rbuf;
+ open my $fh, '<', \$data;
while (defined (my $line = <$fh>)) {
$line = decode_utf8 $line;
foreach my $client (values %{ $self->{clients} }){
@@ -149,6 +149,7 @@ sub run {
$runner->run;
}
+# from Test::TCP
sub _empty_port {
my $port = $ENV{HTTPCAT_PORT} || 45192 + int(rand() * 1000);
@@ -226,17 +227,17 @@ App::htmlcat - stdin to your browser
=over 4
-=item new
+=item my $htmlcat = App::htmlcat->new(@ARGV)
-=item on_read
+Creates an instance. Currently only C<--exec> option is meaningful.
-=item broadcast
+=item $htmlcat->as_psgi
-=item push_line
+Returns the htmlcat PSGI app.
-=item as_psgi
+=item $htmlcat->run
-=item run
+Does plackup internally and runs htmlcat.
=item empty_port
@@ -246,8 +247,6 @@ App::htmlcat - stdin to your browser
motemen E<lt>motemen@gmail.comE<gt>
-=head1 SEE ALSO
-
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
Please sign in to comment.
Something went wrong with that request. Please try again.