Result:
found more than 613 distributions - search limited to the first 2001 files matching your query ( run in 1.015 )


HTML-HTML5-Parser

 view release on metacpan or  search on metacpan

lib/HTML/HTML5/Parser/TagSoupParser.pm  view on Meta::CPAN

      
      $self->{line}++;
      $self->{column} = 0;
    } elsif ($self->{nc} == 0x000D) { # CR
      
## TODO: support for abort/streaming
      my $next = '';
      if ($input->read ($next, 1) and $next ne "\x0A") {
        $self->{next_nc} = $next;
      }
      $self->{nc} = 0x000A; # LF # MUST

lib/HTML/HTML5/Parser/TagSoupParser.pm  view on Meta::CPAN

      if ($self->{nc} == 0x000A) { # LF
        $p->{line}++;
        $p->{column} = 0;
        
      } elsif ($self->{nc} == 0x000D) { # CR
## TODO: support for abort/streaming
        my $next = '';
        if ($input->read ($next, 1) and $next ne "\x0A") {
          $self->{next_nc} = $next;
        }
        $self->{nc} = 0x000A; # LF # MUST

 view all matches for this distribution


HTML-HiLiter

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

 - removed dependency on HTML::Entities by hardcoding all relevant
   entities. (HTML::Entities does a 'require HTML::Parser' which made the
   parser=>0 feature break.)
 - 0.09
 - added Print feature to new() to allow Run() to return highlighted text
   instead of automatically printing in a streaming fashion. Set Print=>0
   to turn off print().
 - Run() now returns highlighted text if Print=>0.
 - changed parser=>0 to Parser=>0.
 - the ParsedWords bug reported in 0.08 was really with my example in
   get_snippet(). so rather than blame someone else's code, I fixed mine...

 view all matches for this distribution


HTML-Macro

 view release on metacpan or  search on metacpan

Macro.pm  view on Meta::CPAN

iteration in succession using identical markup.  You do this by creating a
<loop> tag in your template file containing the markup to be repeated, and
by creating a correspondingly named Loop object attached to the HTML::Macro
and containing all the data to be interpolated.  Note: this requires all
data to be fetched and stored before it is applied to the template; there
is no facility for streaming data.  For the intended use this is not a
problem.  However it militates against using HTML::Macro for text
processing of very large datasets.

  <loop id="people">
    <tr><td>#first_name# #last_name#</td><td>#email#</td></tr>

 view all matches for this distribution


HTML-Mason-PSGIHandler

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  - basic test for leaks
  - Slightly change the internal invoke_mason method for easier reuse
    (Ask Bjørn Hansen)

0.52  October 22, 2010
  - Add streaming handler, HTML::Mason::PSGIHandler::Streamy. (Chia-liang Kao)

0.51  October 18, 2010
  - For body-less response, don't return an undef body element (Chia-liang Kao)
  - Pass Mason -Status into psgi_header (Shawn M Moore)

 view all matches for this distribution


HTML-TableExtractor

 view release on metacpan or  search on metacpan

TableExtractor.pm  view on Meta::CPAN

=head2 EXPORTS


=head2 CAVEATS, BUGS, and TODO

o  parse() should handle other data sources, such as streaming, file handle
etc.


=head2 SEE ALSO

 view all matches for this distribution


HTML-Zoom

 view release on metacpan or  search on metacpan

lib/HTML/Zoom.pm  view on Meta::CPAN


1;

=head1 NAME

HTML::Zoom - selector based streaming template engine

=head1 SYNOPSIS

  use HTML::Zoom;

lib/HTML/Zoom.pm  view on Meta::CPAN

having got this class itself at least somewhat documented I figured now was
a good time to cut a first real release.

=head1 DESCRIPTION

HTML::Zoom is a lazy, stream oriented, streaming capable, mostly functional,
CSS selector based semantic templating engine for HTML and HTML-like
document formats.

Which is, on the whole, a bit of a mouthful. So let me step back a moment
and explain why you care enough to understand what I mean:

lib/HTML/Zoom.pm  view on Meta::CPAN


HTML::Zoom's filehandle object supports an additional event key, 'flush',
that is transparent to the rest of the system but indicates to the filehandle
object to end a getline operation at that point and return the HTML so far.

This means that in an environment where streaming output is available, such
as a number of the L<Plack> PSGI handlers, you can add the flush key to an
event in order to ensure that the HTML generated so far is flushed through
to the browser right now. This can be especially useful if you know you're
about to call a web service or a potentially slow database query or similar
to ensure that at least the header/layout of your page renders now, improving

lib/HTML/Zoom.pm  view on Meta::CPAN


To which I say, "eh", "meh", and possibly also "feh". If it really upsets
you, either use extra classes for this (and remove them afterwards) or
use special fake elements or, well, honestly, just use something different.
L<Template::Semantic> provides a similar idea to zoom except using XPath
and XML::LibXML transforms rather than a lightweight streaming approach -
maybe you'd like that better. Or maybe you really did want
L<Template Toolkit|Template> after all. It is still damn good at what it does,
after all.

So far, however, I've found that for new sites the designers I'm working with

lib/HTML/Zoom.pm  view on Meta::CPAN


=head2 GET THEE TO A SUMMARY!

Erm. Well.

HTML::Zoom is a lazy, stream oriented, streaming capable, mostly functional,
CSS selector based semantic templating engine for HTML and HTML-like
document formats.

But I said that already. Although hopefully by now you have some idea what I
meant when I said it. If you didn't have any idea the first time. I mean, I'm

 view all matches for this distribution


HTTP-Daemon-Threaded

 view release on metacpan or  search on metacpan

lib/HTTP/Daemon/Threaded/CGIAdapter.pm  view on Meta::CPAN

<p>
Developers should be judicious in their use of the CGI interface for
HTTP::Daemon::Threaded: if the request is to return a very large (i.e.,
multi-megabyte) response, the underlying I/O buffering may consume
significant memory resources. Likewise, this package does not support
some methods of "Comet"-style streaming client-server interaction, as the 
response buffer will not be dispatched to the client until the CGI
invokation has completed.
<p>
Copyright&copy 2008, Dean Arnold, Presicient Corp., USA<br>
All rights reserved.

 view all matches for this distribution


HTTP-Engine

 view release on metacpan or  search on metacpan

lib/HTTP/Engine/Interface/PSGI.pm  view on Meta::CPAN

            finalize => sub { _finalize(@_) },
        },
    },
;

sub can_has_streaming { 1 }

sub run {
    my($self, $env) = @_;

    # get PSGI response arrayrey. generated by _finalize

lib/HTTP/Engine/Interface/PSGI.pm  view on Meta::CPAN

      },
  );
  my $app = sub { $engine->run(@_) };
  Plack::Loader->load('Standalone', port => 801)->run($app); # see L<Plack::Server::Standalone> and  L<Plack::Loader>

if you want streaming response

  use HTTP::Engine;
  use IO::Handle::Util qw(io_from_getline); # see L<IO::Handle::Util>
  use Plack::Loader;
  my $count = 1;

 view all matches for this distribution


HTTP-Handle

 view release on metacpan or  search on metacpan

Handle.pm  view on Meta::CPAN

=pod

=head1 NAME

HTTP::Handle - HTTP Class designed for streaming

=head1 SYNOPSIS

 use HTTP::Handle;

 view all matches for this distribution


HTTP-Handy

 view release on metacpan or  search on metacpan

lib/HTTP/Handy.pm  view on Meta::CPAN

  psgi.version        (PSGI requires [1,1]; not set)
  psgi.multithread    (not set; effectively false)
  psgi.multiprocess   (not set; effectively false)
  psgi.run_once       (not set; effectively false)
  psgi.nonblocking    (not set; always blocking)
  psgi.streaming      (not set; not supported)

Applications that check for these keys must treat their absence as false.
For full PSGI/1.1 compliance use L<Plack> (requires Perl 5.8+).

=head1 SECURITY

lib/HTTP/Handy.pm  view on Meta::CPAN


=item * No HTTPS (see above)

=item * No chunked transfer encoding

=item * No streaming -- POST body and response body are fully buffered in memory

=item * Maximum POST body size: 10 MB by default (configurable via C<max_post_size>)

=item * No cookie or session management (implement in the application layer)

 view all matches for this distribution


HTTP-Promise

 view release on metacpan or  search on metacpan

t/mime.types  view on Meta::CPAN

application/vnd.oasis.opendocument.text-template	ott
application/vnd.oasis.opendocument.text-web		oth
# application/vnd.obn
# application/vnd.oftn.l10n+json
# application/vnd.oipf.contentaccessdownload+xml
# application/vnd.oipf.contentaccessstreaming+xml
# application/vnd.oipf.cspg-hexbinary
# application/vnd.oipf.dae.svg+xml
# application/vnd.oipf.dae.xhtml+xml
# application/vnd.oipf.mippvcontrolmessage+xml
# application/vnd.oipf.pae.gem

 view all matches for this distribution


HTTP-Request-StreamingUpload

 view release on metacpan or  search on metacpan

lib/HTTP/Request/StreamingUpload.pm  view on Meta::CPAN


=for stopwords filepath callback chunked HeaderName HeaderValue fh

=head1 NAME

HTTP::Request::StreamingUpload - streaming upload wrapper for HTTP::Request

=head1 SYNOPSIS

=head2 upload from filepath

lib/HTTP/Request/StreamingUpload.pm  view on Meta::CPAN

  );
  my $res = LWP::UserAgent->new->request($req);

=head1 DESCRIPTION

HTTP::Request::StreamingUpload is streaming upload wrapper for L<HTTP::Request>.
It could be alike when $DYNAMIC_FILE_UPLOAD of L<HTTP::Request::Common> was used.
However, it is works only for POST method with form-data.
HTTP::Request::StreamingUpload works on the all HTTP methods.

Of course, you can big file upload using few memory by this wrapper.

 view all matches for this distribution


HTTP-Server-Simple-PSGI

 view release on metacpan or  search on metacpan

lib/HTTP/Server/Simple/PSGI.pm  view on Meta::CPAN

        'psgi.input'      => $self->stdin_handle,
        'psgi.errors'     => *STDERR,
        'psgi.multithread'  => 0,
        'psgi.multiprocess' => 0,
        'psgi.run_once'     => 0,
        'psgi.streaming'    => 1,
        'psgi.nonblocking'  => 0,
        'psgix.io'          => $self->stdio_handle,
    };

    while (my ($k, $v) = each %ENV) {

 view all matches for this distribution


HTTP-ServerEvent

 view release on metacpan or  search on metacpan

lib/Plack/Example/EventChat.pm  view on Meta::CPAN

      if( '/events' ne $path ) {
          # Send the JS+HTML
          return [ 200, ['Content-Type', 'text/html'], [$html] ]
      };

      if( ! $env->{"psgi.streaming"}) {
          my $err= "Server does not support streaming responses";
          warn $err;
          return [ 500, ['Content-Type', 'text/plain'], [$err] ]
      };

      # immediately starts the response and stream the content

 view all matches for this distribution


HTTP-Simple

 view release on metacpan or  search on metacpan

lib/HTTP/Simple.pm  view on Meta::CPAN

=head2 postfile

  my $contents = postfile($url, $path);
  my $contents = postfile($url, $path, $content_type);

Sends a POST request to the given URL, streaming the contents of the given
file. The content type is passed as C<application/octet-stream> if not
specified. Returns the response body as a byte string. Throws an exception on
connection, HTTP, or filesystem errors.

=head2 is_info

 view all matches for this distribution


HTTP-StreamParser

 view release on metacpan or  search on metacpan

lib/HTTP/StreamParser.pm  view on Meta::CPAN

package HTTP::StreamParser;
# ABSTRACT: streaming HTTP parser
use strict;
use warnings;
use parent qw(Mixin::Event::Dispatch);

our $VERSION = '0.101';

=head1 NAME

HTTP::StreamParser - support for streaming HTTP request/response parsing

=head1 VERSION

version 0.101

lib/HTTP/StreamParser.pm  view on Meta::CPAN

 ...
 EOF

=head1 DESCRIPTION

Parses HTTP requests or responses. Generates events. Should be suitable for streaming.
You may be looking for L<HTTP::Parser::XS> instead - it's at least 20x faster than
this module. If you wanted something without XS, there's L<HTTP::Parser>.

Actual implementation is in L<HTTP::StreamParser::Request> or L<HTTP::StreamParser::Response>.

lib/HTTP/StreamParser.pm  view on Meta::CPAN

=item * L<HTTP::Parser::XS> - used by several other modules, fast implementation, pure-Perl fallback,
but doesn't give access to the data until the headers have been parsed and aside from header count and
per-header size limitation, seems not to have any way to deal with oversized requests

=item * L<HTTP::Parser> - parses into L<HTTP::Request>/L<HTTP::Response> objects. Doesn't seem to guard
against large buffers but does have at least some support for streaming.

=item * L<HTTP::MessageParser> - also parses HTTP content

=item * L<Mojo::Message::Request> - part of L<Mojolicious>

 view all matches for this distribution


Hadoop-Inline-ClassLoader

 view release on metacpan or  search on metacpan

eg/seq-read.pl  view on Meta::CPAN


use SequenceFileReader;

my $uri;

# change the protocol to tell which streaming lib to use
#$uri = 'file:///some/local/path/tmp/000000_0';
$uri = 'hdfs:///tmp/000000_0';

# or get it from the command line

 view all matches for this distribution


Hadoop-Streaming

 view release on metacpan or  search on metacpan

lib/Hadoop/Streaming.pm  view on Meta::CPAN


http://hadoop.apache.org

=item Hadoop Streaming interface:

http://hadoop.apache.org/common/docs/r0.20.1/streaming.html

=item PAR::Packer

http://search.cpan.org/perldoc?PAR::Packer

lib/Hadoop/Streaming.pm  view on Meta::CPAN

=item hadoop commandline

Run this in hadoop from the shell:

  hadoop                                     \
      jar $streaming_jar_name                \
      -D mapred.job.name="my hadoop example" \
      -input    my_input_file                \
      -output   my_output_hdfs_path          \
      -mapper   my_mapper                    \
      -combiner my_combiner                  \
      -reducer  my_reducer

$streaming_jar_name is the full path to the streaming jar provided by the installed hadoop.  For my 0.20 install the path is:

  /usr/lib/hadoop-0.20/contrib/streaming/hadoop-0.20.1+152-streaming.jar

The -D line is optional.  If included, -D lines must come directly after the jar name and before other options.

For this hadoop job to work, the mapper, combiner and reducer must be full paths that are valid on each box in the hadoop cluster.  There are a few ways to make this work.

lib/Hadoop/Streaming.pm  view on Meta::CPAN


Additional files may be bundled into the hadoop jar via the '-files' option to hadoop jar.  These files will be included in the jar that is distributed to each host.  The files will be visible in the current working directory of the process.  Subdire...

example:
  hadoop                                     \
      jar $streaming_jar_name                \
      -D mapred.job.name="my hadoop example" \
      -input    my_input_file                \
      -output   my_output_hdfs_path          \
      -mapper   my_mapper                    \
      -combiner my_combiner                  \

lib/Hadoop/Streaming.pm  view on Meta::CPAN

* The mapper/reducer/combiner files can be included with the job via -file options to hadoop jar or they can be referenced directly if they are in the shared environment.

=item full path of shared file

  hadoop                                     \
      jar $streaming_jar_name                \
      -input    my_input_file                \
      -output   my_output_hdfs_path          \
      -mapper   /apps/perl5/bin/my_mapper    \
      -combiner /apps/perl5/bin/my_combiner  \
      -reducer  /apps/perl5/bin/my_reducer

=item local path of included -file file

  hadoop                                     \
      jar $streaming_jar_name                \
      -input    my_input_file                \
      -output   my_output_hdfs_path          \
      -file     /apps/perl5/bin/my_mapper    \
      -file     /apps/perl5/bin/my_combiner  \
      -file     /apps/perl5/bin/my_reducer   \

lib/Hadoop/Streaming.pm  view on Meta::CPAN

Use pp (installed via PAR::Packer) to produce a perl file that needs only a perl interpreter to execute.  I use -x option to run the my_mapper script on blank input, as this forces all of the necessary modules to be loaded and thus tracked in my PAR ...

  mkdir packed
  pp my_mapper -B -P -Ilib -o packed/my_mapper -x my_mapper < /dev/null
  hadoop                                     \
      jar $streaming_jar_name                \
      -input    my_input_file                \
      -output   my_output_hdfs_path          \
      -file     packed/my_mapper             \
      -mapper   ./my_mapper

 view all matches for this distribution


Harvey

 view release on metacpan or  search on metacpan

Word/verb.txt  view on Meta::CPAN

madden,maddened,maddened,maddens,maddening
magnetise,magnetised,magnetised,magnetises,magnetising
magnify,magnified,magnified,magnifies,magnifying
mail,mailed,mailed,mails,mailing
maim,maimed,maimed,maims,maiming
mainstream,mainstreamed,mainstreamed,mainstreams,mainstreaming
maintain,maintained,maintained,maintains,maintaining
make,made,made,makes,making
make,made,made,maketh,making
malfunction,malfunctioned,malfunctioned,malfunctions,malfunctioning
malign,maligned,maligned,maligns,maligning

Word/verb.txt  view on Meta::CPAN

strangle,strangled,strangled,strangles,strangling
strap,strapped,strapped,straps,strapping
stratify,stratified,stratified,stratifies,stratifying
stray,strayed,strayed,strays,straying
streak,streaked,streaked,streaks,streaking
stream,streamed,streamed,streams,streaming
streamline,streamlined,streamlined,streamlines,streamlining
strengthen,strengthened,strengthened,strengthens,strengthening
stress,stressed,stressed,stresses,stressing
stretch,stretched,stretched,stretches,stretching
stretche,stretched,stretched,stretches,stretching

 view all matches for this distribution


Hax-Alg-RollingWindow

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN


# Hax::Alg::RollingWindow

A **fixed-capacity rolling window** (overwrite-oldest) implemented with an **array-backed circular buffer**.

When the window is full and you add new items, the **oldest** items are automatically evicted. This is designed for streaming, metrics, logging, and sliding-window workloads where you want to keep only the most recent *N* values.

## Features

- O(1) insertion (`add`) per element
- O(1) random access (`get`)

 view all matches for this distribution


Hopkins-Plugin-HMI

 view release on metacpan or  search on metacpan

share/root/static/yui/build/charts/charts-debug.js  view on Meta::CPAN

		}
		return "";
	}
};

/* fix for video streaming bug */
YAHOO.deconcept.SWFObjectUtil.cleanupSWFs = function()
{
	var objects = document.getElementsByTagName("OBJECT");
	for(var i = objects.length - 1; i >= 0; i--)
	{

 view all matches for this distribution


Horris

 view release on metacpan or  search on metacpan

lib/App/Horris/CLI/Command/twitter_stream.pm  view on Meta::CPAN

package App::Horris::CLI::Command::twitter_stream;
# ABSTRACT: anyevent twitter streaming script


use Moose;
use Config::General qw/ParseConfig/;
use DBI;

lib/App/Horris/CLI/Command/twitter_stream.pm  view on Meta::CPAN


=encoding utf-8

=head1 NAME

App::Horris::CLI::Command::twitter_stream - anyevent twitter streaming script

=head1 VERSION

version v0.1.2

 view all matches for this distribution


Hyperscan

 view release on metacpan or  search on metacpan

lib/Hyperscan/Database.pm  view on Meta::CPAN


L<hs_open_stream|https://intel.github.io/hyperscan/dev-reference/api_files.html#c.hs_open_stream>

=head3 scan( $data, $flags, $scratch, $callback )

The block (non-streaming) regular expression scanner.

L<hs_scan|https://intel.github.io/hyperscan/dev-reference/api_files.html#c.hs_scan>

=head3 scan_vector( $data, $flags, $scratch, $callback )

 view all matches for this distribution


Hypersonic

 view release on metacpan or  search on metacpan

lib/Hypersonic.pm  view on Meta::CPAN

        parse_headers    => 0,  # Parse HTTP headers
        parse_cookies    => 0,  # Parse Cookie header
        parse_json       => 0,  # Parse JSON body (requires Cpanel::JSON::XS)
        parse_form       => 0,  # Parse form-urlencoded body
        response_helpers => 0,  # JIT compile response helper methods
        streaming        => 0,  # Streaming response handler
        need_xs_builder  => 0,  # Handler receives XS::JIT::Builder
    );
    
    if (ref($opts) eq 'HASH') {
        $dynamic = $opts->{dynamic} ? 1 : 0;

lib/Hypersonic.pm  view on Meta::CPAN

            $dynamic = 1;  # Path params imply dynamic
        }
    }

    # Streaming handlers are always dynamic
    if ($features{streaming}) {
        $dynamic = 1;
    }

    # need_xs_builder handlers are always dynamic (but handled specially at compile time)
    if ($features{need_xs_builder}) {

lib/Hypersonic.pm  view on Meta::CPAN

    push @{$self->{routes}}, {
        method          => $method,
        path            => $path,
        handler         => $handler,
        dynamic         => $dynamic,
        streaming       => $features{streaming},
        need_xs_builder => $features{need_xs_builder},
        params          => \@params,
        segments        => \@segments,
        features        => \%features,
        # Per-route middleware (optional)

lib/Hypersonic.pm  view on Meta::CPAN

        needs_headers    => 0,    # Any route needs header access?
        needs_cookies    => 0,    # Any route needs cookie parsing?
        needs_json       => 0,    # Any route needs JSON body parsing?
        needs_form       => 0,    # Any route needs form data parsing?
        needs_response_helpers => 0,  # Any route needs response helper methods?
        needs_streaming  => 0,    # Any route uses streaming responses?
        needs_xs_builder => 0,    # Any route uses need_xs_builder?
        # Middleware flags - JIT: only generate middleware code if actually used
        has_global_before => scalar(@{$self->{before_middleware}}) > 0,
        has_global_after  => scalar(@{$self->{after_middleware}}) > 0,
        has_route_middleware => 0,  # Any route has before/after hooks?

lib/Hypersonic.pm  view on Meta::CPAN

            $analysis{needs_headers} = 1 if $f->{parse_headers};
            $analysis{needs_cookies} = 1 if $f->{parse_cookies};
            $analysis{needs_json}    = 1 if $f->{parse_json};
            $analysis{needs_form}    = 1 if $f->{parse_form};
            $analysis{needs_response_helpers} = 1 if $f->{response_helpers};
            $analysis{needs_streaming} = 1 if $f->{streaming};
            $analysis{needs_xs_builder} = 1 if $f->{need_xs_builder};
            
            # Auto-detect by analyzing handler code
            my $handler_code = _deparse_handler($route->{handler});
            if ($handler_code) {

lib/Hypersonic.pm  view on Meta::CPAN


    # Store dynamic handlers and param info for runtime access
    $self->{dynamic_handlers} = \@dynamic_handlers;
    $self->{route_param_info} = \@route_param_info;

    # JIT: Build streaming handlers lookup table (only if streaming is enabled)
    if ($self->{route_analysis}{needs_streaming}) {
        my @streaming_flags;
        for my $route (@{$self->{routes}}) {
            next unless $route->{dynamic};
            push @streaming_flags, $route->{streaming} ? 1 : 0;
        }
        $self->{_streaming_flags} = \@streaming_flags;
    }

    # JIT: Build WebSocket handlers lookup table
    if ($self->_has_websocket_routes()) {
        my @ws_handlers;

lib/Hypersonic.pm  view on Meta::CPAN

        $self->{_websocket_paths} = \@ws_paths;
        $self->{route_analysis}{needs_websocket} = 1;
        # Handler is needed if we have websocket routes
        $self->{route_analysis}{needs_websocket_handler} = 1;
        # WebSocket uses Stream for connection handling
        $self->{route_analysis}{needs_streaming} = 1;
    }

    # JIT: Explicit opt-in for Room support (can also be set in new())
    if ($self->{websocket_rooms}) {
        $self->{route_analysis}{needs_websocket_rooms} = 1;

lib/Hypersonic.pm  view on Meta::CPAN

            source       => 'hypersonic_dispatch',
            is_xs_native => 1,
        },
    );

    # Add Stream and SSE XS functions if streaming is enabled
    if ($self->{route_analysis}{needs_streaming}) {
        %functions = (%functions, %{Hypersonic::Stream->get_xs_functions()});
        %functions = (%functions, %{Hypersonic::SSE->get_xs_functions()});
    }

    # Add WebSocket XS functions if WebSocket routes are registered

lib/Hypersonic.pm  view on Meta::CPAN

        Hypersonic::Protocol::HTTP2->gen_dispatcher($builder);
        Hypersonic::Protocol::HTTP2->gen_input_processor($builder);
        $builder->blank;
    }

    # Streaming support - JIT: only generate when streaming handlers detected
    my $analysis = $self->{route_analysis};
    if ($analysis->{needs_streaming}) {
        require Hypersonic::Stream;
        Hypersonic::Stream->generate_c_code($builder, {
            max_streams => $self->{max_connections},
        });

        # SSE support - compile SSE methods when streaming is enabled
        require Hypersonic::SSE;
        Hypersonic::SSE->generate_c_code($builder, {
            max_sse_instances => $self->{max_connections},
        });
    }

lib/Hypersonic.pm  view on Meta::CPAN

            $builder->line("    { $count, { $params_str } },");
        }
        $builder->line('};')
          ->blank;

        # JIT: Streaming handler flags array (only if streaming is enabled)
        if ($analysis->{needs_streaming} && $self->{_streaming_flags}) {
            my @flags = @{$self->{_streaming_flags}};
            my $flags_str = join(', ', @flags);
            $builder->comment('Streaming handler flags - 1 = streaming, 0 = normal')
              ->line("static int g_streaming_handlers[$handler_count] = { $flags_str };")
              ->blank;
        }
    }

    # JIT: WebSocket route paths array (only if WebSocket routes exist)

lib/Hypersonic.pm  view on Meta::CPAN


        $builder->blank
          ->line('char* dyn_resp;')
          ->line('int dyn_resp_len;')
          ->line('call_dynamic_handler(aTHX_ handler_idx, fd, method, method_len, path, full_path_len, body, body_len, recv_buf, len, &dyn_resp, &dyn_resp_len);')
          ->comment('dyn_resp_len == -1 means streaming handler (response already sent)')
          ->line('if (dyn_resp_len >= 0) {')
          ->line('    HYPERSONIC_SEND(fd, dyn_resp, dyn_resp_len);')
          ->line('}')
        ->else
          ->line('HYPERSONIC_SEND(fd, resp, resp_len);')

lib/Hypersonic.pm  view on Meta::CPAN

      ->line('    RouteParamInfo* param_info;')
      ->line('    SV* req_ref;')
      ->line('    SV* mw_result = NULL;')
      ->line('    int short_circuit = 0;')
      ->line('    HV* headers_hv = NULL;')
      ->line('    int is_streaming = 0;')
      ->line('    SV* stream_sv = NULL;')
      ->blank
      ->line('    if (!g_handler_array) {')
      ->line('        *resp_out = (char*)RESP_404;')
      ->line('        *resp_len_out = RESP_404_LEN;')

lib/Hypersonic.pm  view on Meta::CPAN

          ->line('        }')
          ->line('    }');
    }
    
    # JIT: Streaming handler support
    if ($analysis->{needs_streaming}) {
        $builder->blank
          ->comment('JIT: Check if this is a streaming handler')
          ->line('    is_streaming = g_streaming_handlers[handler_idx];')
          ->if('is_streaming')
            ->comment('Create Hypersonic::Stream object for streaming handler')
            ->line('dSP;')
            ->line('PUSHMARK(SP);')
            ->line('XPUSHs(sv_2mortal(newSVpv("Hypersonic::Stream", 0)));')
            ->line('XPUSHs(sv_2mortal(newSVpv("fd", 0)));')
            ->line('XPUSHs(sv_2mortal(newSViv(client_fd)));')

lib/Hypersonic.pm  view on Meta::CPAN

          ->comment('Call main handler (unless middleware short-circuited)')
          ->line('    if (!short_circuit) {')
          ->line('        PUSHMARK(SP);')
          ->line('        XPUSHs(req_ref);');

        # For streaming handlers with middleware
        if ($analysis->{needs_streaming}) {
            $builder->line('        if (is_streaming && stream_sv) XPUSHs(stream_sv);');
        }

        $builder->line('        PUTBACK;')
          ->line('        count = call_sv(*handler_sv, G_SCALAR | G_EVAL);')
          ->line('        SPAGAIN;')

lib/Hypersonic.pm  view on Meta::CPAN

          ->line('    }');
    } else {
        $builder->line('    PUSHMARK(SP);')
          ->line('    XPUSHs(sv_2mortal(req_ref));');

        # For streaming handlers without middleware
        if ($analysis->{needs_streaming}) {
            $builder->line('    if (is_streaming && stream_sv) XPUSHs(stream_sv);');
        }

        $builder->line('    PUTBACK;')
          ->line('    count = call_sv(*handler_sv, G_SCALAR | G_EVAL);')
          ->line('    SPAGAIN;');

lib/Hypersonic.pm  view on Meta::CPAN

            }
        }
    }

    # JIT: Streaming handlers - early return (response already sent via Stream)
    if ($analysis->{needs_streaming}) {
        $builder->blank
          ->comment('JIT: Streaming handlers return early - response sent via Stream object')
          ->if('is_streaming')
            ->line('if (stream_sv) SvREFCNT_dec(stream_sv);')
            ->line('FREETMPS;')
            ->line('LEAVE;')
            ->line('*resp_out = NULL;')
            ->line('*resp_len_out = -1;')
            ->comment('Signal streaming response - caller should not send')
            ->line('return;')
          ->endif;
    }

    $builder->blank

lib/Hypersonic.pm  view on Meta::CPAN

            $global->leave($ws);
            $global->broadcast("A user left");
        });
    });

=head2 streaming

    $server->get('/events' => sub {
        my ($stream) = @_;

        # Send SSE events
        my $sse = $stream->sse;
        $sse->event(type => 'update', data => 'Hello');
        $sse->keepalive;
        $sse->close;
    }, { streaming => 1 });

Enable streaming responses for a route. The handler receives a
L<Hypersonic::Stream> object instead of returning a static response.

B<Stream Object Methods:>

=over 4

lib/Hypersonic.pm  view on Meta::CPAN

            id   => '12345',
        );

        # Keep connection alive...
        $sse->keepalive;
    }, { streaming => 1 });

=head2 Route Handler Options

All route methods accept an optional hashref as the third argument:

lib/Hypersonic.pm  view on Meta::CPAN

Hypersonic uses a "JIT philosophy" - only code that's actually needed gets
compiled. The C<compile()> method analyzes your routes and sets these flags:

=over 4

=item needs_streaming

Set when any route has C<streaming =E<gt> 1>. Compiles L<Hypersonic::Stream>
and L<Hypersonic::SSE> XS code.

=item needs_websocket

Set when any C<websocket()> routes are registered. Compiles

lib/Hypersonic.pm  view on Meta::CPAN

You can inspect these flags after compile:

    $server->compile();
    my $analysis = $server->{route_analysis};
    
    say "Has streaming: ", $analysis->{needs_streaming} ? "yes" : "no";
    say "Has WebSocket: ", $analysis->{needs_websocket} ? "yes" : "no";
    say "Has Rooms: ", $analysis->{needs_websocket_rooms} ? "yes" : "no";

=head2 dispatch

 view all matches for this distribution


IO-Async-Pg

 view release on metacpan or  search on metacpan

lib/IO/Async/Pg.pm  view on Meta::CPAN


=item * Named and positional placeholders

=item * Transaction support with savepoints

=item * Cursor-based streaming for large result sets

=item * LISTEN/NOTIFY pub/sub

=back

 view all matches for this distribution


IO-Async-XMLStream-SAXReader

 view release on metacpan or  search on metacpan

lib/IO/Async/XMLStream/SAXReader.pm  view on Meta::CPAN

    );

    $loop->add($sax);
    $loop->run();

This sub-classes L<< C<IO::Async::Stream>|IO::Async::Stream >> to provide a streaming SAX parser.

For the individual C<SAX> events that can be listened for, see L<< C<XML::SAX::Base>|XML::SAX::Base >>.

All are prefixed with the C<on_> prefix as constructor arguments.

 view all matches for this distribution


IO-Compress-Brotli

 view release on metacpan or  search on metacpan

brotli/c/dec/state.h  view on Meta::CPAN


   Distributed under MIT license.
   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/

/* Brotli state for partial streaming decoding. */

#ifndef BROTLI_DEC_STATE_H_
#define BROTLI_DEC_STATE_H_

#include "../common/constants.h"

 view all matches for this distribution


IO-Compress-Lzf

 view release on metacpan or  search on metacpan

lib/IO/Compress/Lzf.pm  view on Meta::CPAN


Here are a few example that show the capabilities of the module.

=head3 Streaming

This very simple command line example demonstrates the streaming capabilities of the module.
The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT.

    $ echo hello world | perl -MIO::Compress::Lzf=lzf -e 'lzf \*STDIN => \*STDOUT' >output.lzf

The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>,

lib/IO/Compress/Lzf.pm  view on Meta::CPAN


=head2 Examples

=head3 Streaming

This very simple command line example demonstrates the streaming capabilities
of the module. The code reads data from STDIN or all the files given on the
commandline, compresses it, and writes the compressed data to STDOUT.

    use strict ;
    use warnings ;

 view all matches for this distribution


IO-Compress

 view release on metacpan or  search on metacpan

lib/IO/Compress/Bzip2.pm  view on Meta::CPAN


Here are a few example that show the capabilities of the module.

=head3 Streaming

This very simple command line example demonstrates the streaming capabilities of the module.
The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT.

    $ echo hello world | perl -MIO::Compress::Bzip2=bzip2 -e 'bzip2 \*STDIN => \*STDOUT' >output.bz2

The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>,

lib/IO/Compress/Bzip2.pm  view on Meta::CPAN


=head2 Examples

=head3 Streaming

This very simple command line example demonstrates the streaming capabilities
of the module. The code reads data from STDIN or all the files given on the
commandline, compresses it, and writes the compressed data to STDOUT.

    use strict ;
    use warnings ;

 view all matches for this distribution


( run in 1.015 second using v1.01-cache-2.11-cpan-39bf76dae61 )