1Data::Stream::Bulk::UtiUls(e3r)Contributed Perl DocumentDaattiao:n:Stream::Bulk::Util(3)
2
3
4

NAME

6       Data::Stream::Bulk::Util - Utility functions for Data::Stream::Bulk
7

VERSION

9       version 0.11
10

SYNOPSIS

12               use Data::Stream::Bulk::Util qw(array);
13
14               use namespace::clean;
15
16               # Wrap a list in L<Data::Stream::Bulk::Array>
17               return bulk(qw(foo bar gorch baz));
18
19               # return an empty resultset
20               return nil();
21

DESCRIPTION

23       This module exports convenience functions for use with
24       Data::Stream::Bulk.
25

EXPORTS

27       Sub::Exporter is used to create the "import" routine, and all of its
28       aliasing/currying goodness is of course supported.
29
30       nil Creates a new Data::Stream::Bulk::Nil object.
31
32           Takes no arguments.
33
34       bulk @items
35           Creates a new Data::Stream::Bulk::Array wrapping @items.
36
37       cat @streams
38           Concatenate several streams together.
39
40           Returns "nil" if no arguments are provided.
41
42       filter { ... } $stream
43           Calls "filter" on $stream with the provided filter.
44
45       unique $stream
46           Filter the stream to remove duplicates.
47
48           Note that memory use may potentially scale to O(k) where k is the
49           number of distinct items, because this is implemented in terms of a
50           seen hash.
51
52           In the future this will be optimized to be iterative for sorted
53           streams.
54
55           References are keyed by their refaddr (see "id" in
56           Hash::Util::FieldHash).
57

AUTHOR

59       Yuval Kogman <nothingmuch@woobling.org>
60
62       This software is copyright (c) 2012 by Yuval Kogman.
63
64       This is free software; you can redistribute it and/or modify it under
65       the same terms as the Perl 5 programming language system itself.
66
67
68
69perl v5.32.0                      2020-07-28       Data::Stream::Bulk::Util(3)
Impressum