view release on metacpan or search on metacpan
lib/Text/BIP.pm view on Meta::CPAN
}
}
1;
}
# accessors methods to current state while streaming.
sub dir { $_[0]->{__stack}->[-1]->{path} || $path_delim; }
sub relative_dir {
my $base = $_[1] || $_[0]->base;
$_[0]->{__stack}->[-1]->{path}=~m/^$base(.*)/ ? $1 : '';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Text/CSV.pm view on Meta::CPAN
my @list; # List of hashes
csv (in => $_, out => \@list, bom => 1) for sort glob "foo-[0-9]*.csv";
=head4 Streaming
If B<both> C<in> and C<out> are files, file handles or globs, streaming is
enforced by injecting an C<after_parse> callback that immediately uses the
L<C<say ()>|/say> method of the same instance to output the result and then
rejects the record.
If a C<after_parse> was already passed as attribute, that will be included
view all matches for this distribution
view release on metacpan or search on metacpan
}
else {
$cbai = sub { $_[0]->say ($fho, $_[1]); 0 };
}
# Put all callbacks back in place for streaming behavior
$attr{'callbacks'}{'after_parse'} = $cbai; $cbai = undef;
$attr{'callbacks'}{'before_out'} = $cbbo; $cbbo = undef;
$attr{'callbacks'}{'on_in'} = $cboi; $cboi = undef;
$attr{'callbacks'}{'on_error'} = $cboe; $cboe = undef;
$out = undef;
my @list; # List of hashes
csv (in => $_, out => \@list, bom => 1) for sort glob "foo-[0-9]*.csv";
=head4 Streaming
X<streaming>
If B<both> C<in> and C<out> are files, file handles or globs, streaming is
enforced by injecting an C<after_parse> callback that immediately uses the
L<C<say ()>|/say> method of the same instance to output the result and then
rejects the record.
If a C<after_parse> was already passed as attribute, that will be included
}
# using the csv function, all in memory
csv (out => "foo.csv", in => $dbh->selectall_arrayref ($sql));
# using the csv function, streaming with callbacks
my $sth = $dbh->prepare ($sql); $sth->execute;
csv (out => "foo.csv", in => sub { $sth->fetch });
csv (out => "foo.csv", in => sub { $sth->fetchrow_hashref });
Note that this does not discriminate between "empty" values and NULL-values
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 DESCRIPTION
This module provides a class for doing fill-in templates. These templates may be used
as web pages with dynamic content, e-mail messages with fill-in fields, or whatever other
uses you might think of. B<Text::FillIn> provides handy methods for fetching files
from the disk, printing a template while interpreting it (also called streaming),
and nested fill-in sections (i.e. expressions like [[ $th[[$thing2]]ing1 ]] are legal).
Note that the version number here is 0.04 - that means that the interface may change
a bit. In fact, it's already changed some with respect to 0.02 (see the CHANGES file).
In particular, the $LEFT_DELIM, $RIGHT_DELIM, %HOOK, and @TEMPLATE_PATH variables are
This, along with interpret_and_print, are the main point of this whole module.
=item * $template->interpret_and_print()
Interprets the [[ fill-in parts ]] of a template and prints the template,
streaming its output as much as possible. This means that if it encounters
an expression like "[[ stuff [[ more stuff]] ]]", it will fill in [[ more stuff ]],
then use the filled-in value to resolve the value of [[ stuff something ]],
and then print it out.
If it encounters an expression like "stuff1 [[thing1]] stuff2 [[thing2]]",
view all matches for this distribution
view release on metacpan or search on metacpan
data/en_US.dic view on Meta::CPAN
streaker/M
streaky/TR
stream/GZSMDR
streamed/U
streamer/M
streaming/M
streamline/SRDGM
street/SMZ
streetcar/MS
streetlight/SM
streetwalker/MS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Text/JSON/Nibble.pm view on Meta::CPAN
our $VERSION = '1.01';
=head1 WARNING
This module should be used with caution, it will not handle 'badly formed' json well, its entire purpose was because I was experiencing
segfaults with Cpanel::XS's decode_prefix when dealing with a streaming socket buffer.
=head1 DESCRIPTION
This module is a 'character' crawling JSON extractor for plain TEXT, usable in both a 'streaming' or 'block' method, for when you need something that is not XS.
It is particularly handy for when you want to deal with JSON without decoding it.
=head1 SYNOPSIS
lib/Text/JSON/Nibble.pm view on Meta::CPAN
=head2 digest
Digest the text that is fed in and attempt to return a complete an array of JSON object from it, returns either a blank array or an array of text-encoded-json.
Note you can call and use this at any time, even if you are using streaming functionality.
=cut
sub digest {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Text/MarkdownTable.pm view on Meta::CPAN
has condense => (
is => 'rw',
);
has streaming => (is => 'rwp');
has _fixed_width => (is => 'rw', default => sub { 1 });
# TODO: duplicated in Catmandu::Exporter::CSV fields-coerce
sub _coerce_list {
lib/Text/MarkdownTable.pm view on Meta::CPAN
}
my $fields = $self->fields;
my $widths = $self->widths; # may set
my $row = [ ];
if (!$self->streaming and ($self->condense or $self->_fixed_width)) {
$self->_set_streaming(1);
$self->_print_header if $self->header;
}
foreach my $col (0..(@$fields-1)) {
my $field = $fields->[$col];
lib/Text/MarkdownTable.pm view on Meta::CPAN
}
sub _add_row {
my ($self, $row) = @_;
if ($self->streaming) {
$self->_print_row($row);
} else {
push @{$self->{_rows}}, $row;
}
}
lib/Text/MarkdownTable.pm view on Meta::CPAN
=item add( $row )
Add a row as hash reference. Returns the table instance.
=item streaming
Returns whether rows are directly written or buffered until C<done> is called.
=item done
Finish and write the table unless it has already been written in C<streaming>
mode.
=back
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Text/NSR.pm view on Meta::CPAN
=head1 AUTHOR
Clipland GmbH L<https://www.clipland.com/>
This module was developed for L<live streaming|https://instream.de/> infotainment website L<InStream.de|https://instream.de/>.
=head1 COPYRIGHT & LICENSE
Copyright 2022 Clipland GmbH. All rights reserved.
view all matches for this distribution
view release on metacpan or search on metacpan
t/57_breakme-multi.t view on Meta::CPAN
"killed",
"label",
"legalization",
"life styles",
"local authorities",
"mainstreaming",
"malnutrition",
"market reform",
"market reforms",
"medical treatment",
"medical treatments",
view all matches for this distribution
view release on metacpan or search on metacpan
Testing/preprocess/plain/text2sval/test-A1.reqd view on Meta::CPAN
</context>
</instance>
<instance id="line-n.w7_114:9011:">
<answer instance="line-n.w7_114:9011:" senseid="formation"/>
<context>
the ghost town at knott's berry farm theme park is usually a pretty cheery place bustling with cowboys staging shootouts on the storefront boardwalks folks buying souvenirs and snacks from calico clad shopkeepers and <head>lines</head> streaming ont...
</context>
</instance>
<instance id="line-n.w7_088:11840:">
<answer instance="line-n.w7_088:11840:" senseid="formation"/>
<context>
view all matches for this distribution
view release on metacpan or search on metacpan
Corpus/written/ficlets/1402.txt view on Meta::CPAN
Sequels: none
I like games.
I started playing my games because of people like Jenna. Middle school was cruel, full of disgusting, stinking children. Hardly a place for the likes of me, but nobody ever did a thing about it.
The thing that set me off at first was her hair; it was long and shiny and blonde. Every time somebody spoke to her, she tossed it over her shoulder, rivers of gold streaming down her back. Practically taunting me and my scissors. After a few weeks o...
I recall how she cried when I chopped it all off with messy, rough snips. I remember her straw-hair wound tightly around her neck; I didnât need any rope. Tipping over the chair and putting a match to the boyish mess that was the rest of her hair.....
Want to play a game with me? There are only a few rules. First, you must play along. Second, donât try to escape. Oh, and third, I always win.
Frantic Panic
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Textile2x.pm view on Meta::CPAN
=item Filehandle reference (GLOB)
Lastly, if the source is a filehandle or filehandle-like value, it is read from
and the complete content from it is passed to B<Text::Textile>. Note that it is
not I<streamed> to the Textile converter (which does not support streaming
anyway). Caution should be taken when converting excessively large files this
way.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Text/ZPL.pm view on Meta::CPAN
=head2 decode_zpl
Given a string of C<ZPL>-encoded text, returns an appropriate Perl C<HASH>; an
exception is thrown if invalid input is encountered.
(See L<Text::ZPL::Stream> for a streaming interface.)
=head2 encode_zpl
Given a Perl C<HASH>, returns an appropriate C<ZPL>-encoded text string; an
exception is thrown if the data given cannot be represented in C<ZPL> (see
view all matches for this distribution
view release on metacpan or search on metacpan
0.0300 2014-06-28 Piotr Roszatycki <dexter@cpan.org>
* Based on Starlight 0.0302
* Does not hang up on daemonize without error log file.
* Bugfix for streaming mode (Use of uninitialized value).
* Requirement for Time::HiRes is optional.
* Suggests Time::TZOffset on Windows.
* Support for "quiet", "user", "group", "umask", "daemonize", "pid" and
"error-log" options.
view all matches for this distribution