Plack-App-CGIBin-Streaming

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


EXAMPLE
    This distribution contains a complete example in the eg/ directory.
    After building the module by

     perl Build.PL
     ./Build

    you can try it out:

     (cd eg && starman -l :5091 --workers=2 --preload-app app.psgi) &

    Then you should be able to access

    *   <http://localhost:5091/clock.cgi?30>

    *   <http://localhost:5091/flush.cgi>

    The clock example is basically the script displayed above. It works in
    Firefox. Other browsers don't support multipart HTTP messages.

lib/Plack/App/CGIBin/Streaming.pm  view on Meta::CPAN

our $VERSION = '0.06';

BEGIN {
    # this works around a bug in perl

    # In Perl (at least up to 5.18.0) the first assignment to $SIG{CHLD}
    # or $SIG{CLD} determines which name is later passed to the signal handler
    # on systems like Linux that support both names.
    # This hack tries to be the first such assignment in the perl program
    # and thus pin down that name.
    # Net::Server based servers like starman rely on "CHLD" to be passed to
    # the signal handler.
    local $SIG{CHLD}=$SIG{CHLD};
}

use parent qw/Plack::App::File/;
use CGI;
use CGI::Compile;
use File::Spec;
use Plack::App::CGIBin::Streaming::Request;
use Plack::App::CGIBin::Streaming::IO;

lib/Plack/App/CGIBin/Streaming.pm  view on Meta::CPAN

=head1 EXAMPLE

This distribution contains a complete example in the F<eg/> directory.
After building the module by

 perl Build.PL
 ./Build

you can try it out:

 (cd eg && starman -l :5091 --workers=2 --preload-app app.psgi) &

Then you should be able to access

=over 4

=item * L<http://localhost:5091/clock.cgi?30>

=item * L<http://localhost:5091/flush.cgi>

=back



( run in 0.700 second using v1.01-cache-2.11-cpan-e93a5daba3e )